1 Reply Latest reply on Mar 31, 2008 9:58 PM by sameerb

    combobox as itemrenderer in advanceddatadrid

    MyNickSG Level 1
      I am trying to bind combobox column in datagrid. when i provide dataprovider statically in datagrid, its working fine..

      here is d code for static combobox binding:

      <mx:DataGridColumn dataField="Column" editable="false">
      <mx:String>First Name</mx:String>
      <mx:String>Last Name</mx:String>

      however if i try binding the same combobox column using some array(d data returned by web service or some array collection), its giving an error(object array not defined)

      here are the methods i have tried for dynamic binding, both methods are not working:

      <mx:XMLList id="statesXMLList">
      <state abbrev="AL" name="Alabama" />
      <state abbrev="AK" name="Alaska" />
      <state abbrev="AZ" name="Arizona" />
      <state abbrev="AR" name="Arkansas" />
      <state abbrev="CA" name="California" />
      <state abbrev="CO" name="Colorado" />
      <state abbrev="CT" name="Connecticut" />

      <mx:Component id="inlineEditor">
      <mx:ComboBox dataProvider="{statesXMLList}"

      Error: statesXMLList not defined

      Method 2:

      <mx:AdvancedDataGridColumn dataField="Column" editable="false">
      <mx:ComboBox itemRenderer="{SegmentCombo}">

      If i create new custom component, its wrking fine. i dont want to use custom component, is there any other way to render combobox.?? Please help me out..

      Thanks in Advance