0 Replies Latest reply on Apr 28, 2008 4:11 PM by joshua_shizny

    expand all not working for me

    joshua_shizny
      I have no clue on this and it sucks. Can anybody tell me why my expandAll() call does not work. It does not expand the nodes. Here is my code. The ADG is created in actionscript and then grouping is applied to create hierarchical data. The last three lines of the following code are where I call expandAll... after validateNow too.

      [CODE]var oneColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn("FRONTS: ("+firstsFronts.length+")");
      var twoColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn("#");
      var threeColumn:AdvancedDataGridColumn = new AdvancedDataGridColumn("%");
      oneColumn.width = 120;
      twoColumn.width = 35;
      threeColumn.width = 45;
      oneColumn.sortable = false;
      twoColumn.sortable = false;
      threeColumn.sortable = false;


      oneColumn.dataField = "FRONT";
      twoColumn.dataField = "theCount";
      threeColumn.dataField = "thePercentage";
      //twoColumn.width = 20;

      indPersonnelDataGridFronts.columns = [oneColumn,twoColumn,threeColumn];

      var groupingColl:GroupingCollection = new GroupingCollection();
      var groupingGroup:Grouping = new Grouping();

      groupingColl.source = firstsFronts;
      var myFieldGroup:GroupingField = new GroupingField("FRONT");
      groupingGroup.fields = [myFieldGroup];
      groupingColl.grouping = groupingGroup;

      var sr:SummaryRow = new SummaryRow();
      var sf:SummaryField = new SummaryField();
      sf.dataField = "FRONT";
      sf.operation = "COUNT";
      sf.label = "theCount";
      sr.fields = [sf];
      sr.summaryPlacement = "group";
      //myFieldGroup.summaries = [sr];

      var srP:SummaryRow = new SummaryRow();
      var sfP:SummaryField = new SummaryField();
      sfP.dataField = "FRONT";
      sfP.summaryFunction = calcPercentage;
      sfP.operation = "COUNT";
      sfP.label = "thePercentage";
      srP.fields = [sfP];
      srP.summaryPlacement = "group";
      myFieldGroup.summaries = [sr, srP];

      groupingColl.refresh();
      indPersonnelDataGridFronts.dataProvider = groupingColl;
      indPersonnelDataGridFronts.validateNow();
      indPersonnelDataGridFronts.expandAll();[/CODE]