Skip navigation
Currently Being Moderated

GridItemEditor

Nov 20, 2012 10:02 AM

I am using Flex GridItemEditor to show a combo when a cell under editing. When a user activates Editing I am using the following code to show the correct item:

for(var i:int = 0; i < dataProvider.length; i ++){

                                                  var listItem:ListItem = dataProvider.getItemAt(i) as ListItem;

                                                  if(data[column.dataField] ==  listItem.value))

                                                  {

       comboBox.selectedIndex = i;

       break;

                                                  }

                                        }

Then somewhere outside I am checking for comboBox.selectedIndex:

var dropDownRenderer:DropDownItemRenderer = dataGridEditor.itemEditorInstance as DropDownItemRenderer;

                                                                                 if(dropDownRenderer.comboBox.selectedIndex < 0)

and it is -1.

 

Any idea why?

Also when I activate a cell for editin I see an old value through but dimmed.

 

Thanks

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points