0

The problem I'm facing is that I have multiple columns using includeIn or excludeFrom properties set and the result is that the expected behavior is observed only for the first column for which one of these properties is set. Here is the simplified example representing the problem:

<?xml version="1.0" encoding="utf-8"?>
<mx:AdvancedDataGrid
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      currentState="A">
   <mx:states>
      <mx:State name="A"/>
      <mx:State name="B"/>
   </mx:states>
   <mx:columns>
      <mx:AdvancedDataGridColumn id="col1" headerText="col 1" />
      <mx:AdvancedDataGridColumn id="col2" headerText="col 2" includeIn="A"/>
      <mx:AdvancedDataGridColumn id="col3" headerText="col 3" includeIn="A"/>
      <mx:AdvancedDataGridColumn id="col4" headerText="col 4" includeIn="A"/>
   </mx:columns>
</mx:AdvancedDataGrid>

Only "col 1" and "col 2" are displayed, but not "col 3" and "col 4". I'm using Flex SDK 4.6

Any suggestions what is wrong and how can be workarounded?

ILAPE
  • 47
  • 1
  • 5

1 Answers1

0

Use

  <mx:AdvancedDataGridColumn id="col2" headerText="col 2" visible="{currentState='A'}"/>
flexicious.com
  • 1,601
  • 1
  • 13
  • 21