3 Replies Latest reply on Aug 9, 2007 10:54 PM by Sreenivas R

    Can summaryPlacement be changed dynamically

    rbetieh Level 1
      Hi,

      I wanted to try to change where my summary row would appear on the ADG so that when an item is closed it would appear on the group line and when it is open it would appear as the last line. This doesnt seem to work however, is there a way to change the row placement?

      private function handleItemOpen(event:AdvancedDataGridEvent ):void
      {
      Summary2.summaryPlacement = " last";

      }
      private function handleItemClose(event:AdvancedDataGridEvent ):void
      {
      Summary2.summaryPlacement = "group";

      }


      I would have thought that simply changing the string would do it but alas it does not
        • 1. Re: Can summaryPlacement be changed dynamically
          sameerb Level 1
          Hi,
          After changing the summaryPlacement, the changes will not get reflected unless you refresh the GroupingCollection again by calling GroupingCollection.refresh().

          Thanks,
          Sameer
          • 2. Re: Can summaryPlacement be changed dynamically
            rbetieh Level 1
            Hi Sameer,

            Thanks for taking a look at this. I changed the code as follows:

            private function handleItemOpen(event:AdvancedDataGridEvent ):void
            {
            Summary2.summaryPlacement = "last";
            gc.refresh();

            }
            private function handleItemClose(event:AdvancedDataGridEvent ):void
            {
            Summary2.summaryPlacement = "group";
            gc.refresh();
            }

            This causes the group to close immediately after it opens, which makes it impossible to do anything with the data. You only get to see it open for a split second. It does move the summary placement though.

            Thanks,

            Santiago
            • 3. Re: Can summaryPlacement be changed dynamically
              Sreenivas R Adobe Employee
              Hi

              ADG/GroupingCollection currenlty doesn't support dynamic changing. The refresh work-around would cause the problem you are facing because the collection is getting rebuilt.

              Best solution possible currently is to use summaryPlacement="last group" so that summary is always visible at both the places.


              Thanks
              Sreenivas.