1 Reply Latest reply on Jun 15, 2011 12:56 PM by Flex harUI

    How can I make checkboxes (ItemRenderer) appear at the top level only on AdvancedDataGrid

    majester8425 Level 1

      Here is what I have

       

      img1.JPG

      Its an Advanced data grid with tree column. I want to have only one Check box available on the first row. All the expanded children should have nothing.

       

      My code is using an inline, so I am guessing I'll need to move that out. Any Ideas ?

       

      <mx:AdvancedDataGrid 
       width="100%" 
       height="100%"
       treeColumn="{area}"> 
       <mx:dataProvider>
        <mx:HierarchicalData 
         source="{dpHierarchy}" 
         childrenField="details"/>
       </mx:dataProvider>
        
       <mx:columns>
        <mx:AdvancedDataGridColumn dataField="NM" headerText="Name"/>
        <mx:AdvancedDataGridColumn 
         id="area" 
         dataField="NM"
         headerText="Details"/>  
         
        <mx:AdvancedDataGridColumn 
         id="myCb" 
         dataField="MY_FLAG" 
         headerText="Select"
         itemRenderer="mx.controls.CheckBox" 
         rendererIsEditor="true" 
         editorDataField="selected"/>    
       </mx:columns>
      </mx:AdvancedDataGrid>