1 Reply Latest reply on Jun 18, 2010 3:55 AM by Mugunda

    AdvancedDataGrid GroupingCollection export to excel

    Mugunda Level 1



      I have a simple action Script method which is used to export flat/plain data in advanced datagrid  as a table.

      Now When my Advanced Data Grid Data provider is a GroupingCollection, with summary row  how to export it into excel.


      I searched and found some information, where convert the dataprovider as HierarchicalCollectionView and use a cursor and iterate and get the summary row  values.

      I am able to  successfully do this but I am unable to get the group name.


      My code now is



          var hv:HierarchicalCollectionView=adg.dataProvider as HierarchicalCollectionView;

          var cursor:IViewCursor=hv.createCursor();

          var columns:Array=adg.columns;

          var columnCount:int=adg.columns.length;

           while (!cursor.afterLast)



                      for (var k:int=0; k < columnCount; k++)
                          str+="<td>" + (columns[k] as AdvancedDataGridColumn).itemToLabel(cursor.current) + "</td>";





      For the above code, I am able to get the grouped summary row values to excel, but the group label(Grouping column name ) is empty.

      How to get that value.


      Please help