0 Replies Latest reply on Nov 2, 2012 7:45 AM by flex4

    Not able to copy the text from the root nodes in Advanced datagrid.

    flex4 Level 2

      Hi All,


         I am using hierarchical data to populate my Advanced datagrid. I need to allow user to copy the data from any of the cell from Grid.


          I am able to copy the text from other columns by using simple item renderer. And for First column where tree is pupulating I am not able to copy any


        the text from root nodes. I am able to copy the text from childrens but not from parent nodes.


         This is my code of advanced datagrid.


      Here is my Advanced datagrid code.


      <s:Panel horizontalCenter="0" verticalCenter="0" width="800" height="600"

                                     title="ADG Copy">


            <mx:AdvancedDataGrid width="100%" height="100%" >


                                    <mx:HierarchicalData source="{dpHierarchy}"/>



                                   <mx:AdvancedDataGridColumn dataField="Region"  itemRenderer="renderer.GroupRenderer"/>

                                    <mx:AdvancedDataGridColumn dataField="Territory_Rep" headerText="Territory Rep"/>

                                    <mx:AdvancedDataGridColumn dataField="Actual"/>

                                    <mx:AdvancedDataGridColumn dataField="Estimate"/>





      Here is my Item Renderer Code






      package renderer


                     import mx.controls.Label;

                     import mx.controls.advancedDataGridClasses.AdvancedDataGridGroupItemRenderer;


                     public class GroupRenderer extends AdvancedDataGridGroupItemRenderer


                                              public function GroupRenderer()




                                         override protected function createChildren():void



                                                             this.label.selectable = true;






      I want to copy the text of root nodes as well where we are expanding.


      Below are the images to understand it better.





      Please help me to sort this out. If you need any further information please let me know.