1 Reply Latest reply on Sep 14, 2010 2:41 PM by Flex harUI

    datagrid and combobox

    RosieGp Level 1

      Hi all,

      I have two issues...

      First is that my combobox in datagrid is not populating...

      Here is the code:

       

      private

       

      function openWindow():void

      {

       

      var testWindow:TitleWindow = new TitleWindow();

       

      testWindow=TitleWindow(PopUpManager.createPopUp(

      this, test, true));

      testWindow["Id"]=testDG.selectedItem.ID;

      }

       

       

      private

       

       

      function handle_returnTestAC(e:ResultEvent):void

      {

      testArray=ArrayCollection(e.result);

      }

       

      <mx:DataGrid

       

      toolTip="Click for Description" id="testDG" dataProvider="{testAC}" doubleClickEnabled="true" eventClick="openWindow()">

       

       

      <mx:columns>

       

       

      <mx:DataGridColumn dataField="ID" headerText="ID" />

       

       

      <mx:DataGridColumn dataField="Michigan_Produce" headerText="Michigan Produce" />

       

       

      <mx:DataGridColumn headerText="Type" dataField="TypeName">

       

      <mx:itemRenderer>

       

      <mx:Component>

       

      <mx:ComboBox prompt="Type" dataProvider="(testArray)" labelField="TypeName"/>

       

      </mx:Component>

       

      </mx:itemRenderer>

       

      </mx:DataGridColumn>

       

       

       

       

       

      </mx:columns>

       

       

      </mx:DataGrid>

       

      If i call this combobox outside the Datagrid it works:

      <mx:ComboBox

       

      id="cmb" dataProvider="{testAC}" labelField="TypeName" prompt="Type"/>

       

       

      2. Problem is that how do I make "Type" DataGridColumn not double click enabled. as when I make a selection in the combobox it does not open the pop up...

      I'll really appreciate any help... thanks...