0 Replies Latest reply on Oct 8, 2010 2:24 AM by srinibose

    Advanced Datagrid GroupingCollection of flat data (XMLLISTCollection) while sorting throws exception

    srinibose Level 1

      HI,

       

           Iam using AdvancedDatagrid inorder to group the flat data populated from the backend through BlazeDS. Result data will be in xml format and i have converted it to xmllistcollection and assigned to the grouping collection source. Flat data is grouped by one of the attribute called 'Name' and refreshed after data has been populated.

       

      Data structre used as input is: WIth this structure, iam grouping by the field 'Name'.

       

       

      <Report>

      <att_report>

        <id>FDR1</id>

        <Name>Feeder 1</Name>

        <frequency>Monthly</frequency>

        <Field>Finance 1</Field>

        <Aug_10>100</Aug_10>

        <Jul_10>200</Jul_10>

      </att_report>

      <att_report>

        <id>FDR1</id>

        <Name>Feeder 1</Name>

        <frequency>Yearly</frequency>

        <Field>Finance 2</Field>

        <Jul_10>200</Jul_10>

      </att_report>

      <att_report>

        <id>FDR2</id>

        <Name>Feeder 2</Name>

        <frequency>Quarterly</frequency>

        <Field>Finance 3</Field>

        <Jul_10>2000</Jul_10>

      </att_report>

      <att_report>

        <id>FDR2</id>

        <Name>Feeder 2</Name>

        <frequency>MOnthly</frequency>

        <Field>Finance 2</Field>

        <Jul_10>2000</Jul_10>

      </att_report>

      <att_report>

        <id>FDR4</id>

        <Name>Feeder 4</Name>

        <frequency>yearly</frequency>

        <Field>Finance 5</Field>

        <Jul_10>2000</Jul_10>

      </att_report>

      </Report>

       

          

      Grouping is done as expected. We have additional functionalities like soring / seraching of the result set. Either one is working fine. Other functionality throws excpetion mentioned below.

       

      When any of the advanced datagrid grid column header is clicked for sorting, it throws exception. I have pasted the exception below for reference.

       

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.collections::HierarchicalCollectionView/internalRefresh()[C:\work\flex\dmv_automation\ projects\datavisualisation\src\mx\collections\HierarchicalCollectionView.as:709]
      at mx.collections::HierarchicalCollectionView/refresh()[C:\work\flex\dmv_automation\projects \datavisualisation\src\mx\collections\HierarchicalCollectionView.as:686]
      at mx.controls::AdvancedDataGridBaseEx/sortHandler()[C:\work\flex\dmv_automation\projects\da tavisualisation\src\mx\controls\AdvancedDataGridBaseEx.as:6869]
      at mx.controls::AdvancedDataGrid/sortHandler()[C:\work\flex\dmv_automation\projects\datavisu alisation\src\mx\controls\AdvancedDataGrid.as:6899]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls::AdvancedDataGrid/headerReleaseHandler()[C:\work\flex\dmv_automation\projects \datavisualisation\src\mx\controls\AdvancedDataGrid.as:7120]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at mx.controls::AdvancedDataGridBaseEx/mouseUpHandler()[C:\work\flex\dmv_automation\projects \datavisualisation\src\mx\controls\AdvancedDataGridBaseEx.as:5738]
      at mx.controls::AdvancedDataGrid/mouseUpHandler()[C:\work\flex\dmv_automation\projects\datav isualisation\src\mx\controls\AdvancedDataGrid.as:8457]

       

       

       

       

      I tried with couple of options but still not able to get rid of the excpetion. I browsed through couple of links also, still not able to find an solution. Can i know whether it is a bug or it can be fixed.

       

      Any help / suggestions on this will be great.

       

      Thanks in Advance,

      Srinivasan