1 Reply Latest reply on Jul 24, 2007 6:13 PM by ntsiii


      Hi all,

      I've got a DataGrid, "dg", whose dataprovider is set to an array of "thing" objects.

      Each row then has several columns using a custom renderer, a canvas containing a combobox. The combobox's dataprovider is set to thing's array of "subthing" objects. The editorDataField for each row is set to "selectedItem".

      When a combobox is changed, I need to set Thing.subthing = combobox.selectedItem. Unfortunately I can't make this happen.

      If I don't include a "selectedItem" variable within the MXML component definition, I get the following RTE on focus out of the combobox:

      ReferenceError: Error #1069: Property selectedItem not found on renderers.worksheet.SubThingComboBox and there is no default value.

      Once I add selectedItem, then I get this RTE:

      ReferenceError: Error #1069: Property null not found on Thing and there is no default value.

      Basically, how do I map the selectedItem of the combobox to Thing.subThing?
        • 1. Re: DataGrid/ComboBox/ItemEditor
          ntsiii Level 3
          The override set data() method returns a reference to the current "thing". On combo box change, you can use this reference to set the property in the thing item.

          If you do not know what the "overide set data()" method is, you need to study some more on itemRenderers. There are several examples on cflex.net and many elsewhere on the net.