2 Replies Latest reply on Sep 7, 2010 9:35 AM by iamcootis

    Putting a combobox in an advanceddatagrid

    iamcootis Level 1

      I know that I was able to do this in Flex 3, but for some reason I keep getting errors in Flex 4 by trying to put a ComboBox into an advancedDataGrid. I basically want the datagrid to be completely independent of the list of objects that are in the datagrids dataProvider.

       

      Right now I have something that looks like this:

       

      <ns:XX_DataGrid id="serversDataGrid" left="3" right="3" bottom="4"  allowMultipleSelection="false" selectable="false" dataProvider="{dModel.serversSelectedForDeployment}">
                      <ns:groupedColumns>
             
                          <ns:XX_DataGridColumn headerText="{l.Servers_ServiceTag}" dataField="SvcTag" width="118" sortCompareFunction="onSvcTagSort"/>
                          <ns:XX_DataGridColumn headerText="{l.Servers_Model}" dataField="Model" width="110" sortCompareFunction="onModelSort"/>
                          <mx:XX_DataGridColumn headerText="{l.Profile}"
                                  itemRenderer="com.dell.pg.spectre.components.itemRenderers.ComboBoxItemRenderer"
                                   />
                     
                      </ns:groupedColumns>
                  </ns:XX_DataGrid>

       

      The item renderer looks like this:

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx"
                      autoDrawBackground="true">
         
          <s:Label text="{data}"/>
         
      </s:MXDataGridItemRenderer>

       

      I've tried this several ways. Anyone know how to get this to work?