0 Replies Latest reply on Nov 20, 2012 10:02 AM by Zolotoj

    GridItemEditor

    Zolotoj Level 3

      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