0 Replies Latest reply on May 13, 2009 9:32 PM by Stanleyhe

    Expanding/Collapsing the grouping, it should not change the Item selected

    Stanleyhe

      Is this a known Flex component bug? Or am I missing something?

      Thanks in advance!!!

      ~Stanley

       

      Detail repro-steps:
      1. Click "Southwest",
      2. Click "Arizona"
      3. Click the "CheckBox" for row of "Dana" - ok, "Dana" is selected
      4. Click "Arizona" - hide the two rows
      5. Click "Arizona" - the two row will show up: opps - now "Barbara" is selected - it should be the original one:"Dana".

      (Repeating step 4 and 5, it will swaapping between Dana and Barbara.)

       

       

      Here is the full code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="
      http://www.adobe.com/2006/mxml " layout="absolute">

      <mx:Script>
      <![CDATA[
      import mx.collections.ArrayCollection;


      [Bindable]
      private var dpFlat:ArrayCollection = new ArrayCollection([
      {Region:"Southwest", Territory:"Arizona",
      Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
      {Region:"Southwest", Territory:"Arizona",
      Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}
      ]);
      ]]>
      </mx:Script>


      <mx:AdvancedDataGrid id="myADG"
      width="100%" height="100%"
      defaultLeafIcon="{null}"
      initialize="gc.refresh();">
      <mx:dataProvider>
      <mx:GroupingCollection id="gc" source="{dpFlat}">
      <mx:Grouping>
      <mx:GroupingField name="Region"/>
      <mx:GroupingField name="Territory"/>
      </mx:Grouping>
      </mx:GroupingCollection>
      </mx:dataProvider>

      <mx:columns>
      <mx:AdvancedDataGridColumn dataField="GroupLabel"
      headerText="Region/Territory" itemRenderer="mx.controls.CheckBox"/>
      <mx:AdvancedDataGridColumn dataField="Territory_Rep"
      headerText="Territory Rep"/>
      <mx:AdvancedDataGridColumn dataField="Actual"/>
      <mx:AdvancedDataGridColumn dataField="Estimate"/>
      </mx:columns>
      </mx:AdvancedDataGrid>
      </mx:Application>