3 Replies Latest reply on Apr 1, 2009 11:06 AM by _Natasha_

    (advanced)data gridcolumn question

    ice9_us
      I have an advanceddatagridcolumn setup..
      I want on of the index columns to work like a combo box.. I am not sure how to start in getting that done..
      Can anyone help?
        • 1. Re: (advanced)data gridcolumn question
          _Natasha_ Level 4
          You showld set itemRenderer for your your column to ComboBox
          • 2. Re: (advanced)data gridcolumn question
            ice9_us Level 1
            why doesn't this work..
            i get a Sev_List not know error.

            <mx:ArrayCollection id="Sev_List" >
            <mx:String>sev_1</mx:String>
            <mx:String>sev_2</mx:String>
            <mx:String>sev_3</mx:String>
            </mx:ArrayCollection>


            <mx:AdvancedDataGrid id="grid" x="136" y="141" dataProvider="{taskCol}" designViewDataType="tree">
            <mx:columns>
            <mx:AdvancedDataGridColumn headerText="Column 2" dataField="task">
            <mx:itemRenderer>
            <mx:Component>
            <!-- <mx:ComboBox tabEnabled="true" selectedIndex="1" change="data.priority=selectedItem;" text="{data.priority}"> -->
            <mx:ComboBox tabEnabled="true" selectedIndex="1" text="{data.priority}" dataProvider="{Sev_List}" />
            </mx:Component>
            </mx:itemRenderer>
            </mx:AdvancedDataGridColumn>
            </mx:columns>
            </mx:AdvancedDataGrid>
            • 3. Re: (advanced)data gridcolumn question
              _Natasha_ Level 4
              It's very easy. In custom itemRenderer variables should be used {outerDocument.VARIABLE
              So it showld be}
              <mx:ComboBox tabEnabled="true" selectedIndex="1" text="{data.priority}" dataProvider="{outerDocument.Sev_List}" />