2 Replies Latest reply on Aug 11, 2009 1:04 AM by vlad.flore

    Datagrid column(s) sorting problem

    vlad.flore

      Hi all,

       

      I've started with Flex 3 a couple of weeks ago and I've stumbled upon a problem with Datagrid and sorting behaviour. If someone could point me in the right direction 'cause this issue is giving me headaches.

       

      What I have is, a datagrid populated with data taken via BlazeDS from Java, I construct an ArrayCollection object, which contains object of some sort - created by me -  and this is later set as dataprovider for the datagrid object. I've noticed that, sometimes, when clicking on some datagrid headers(to sort the data from that column) i got this error, which I couldn't explain (this is just some part of the error I've posted):

       

      TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::DataGrid/makeRowsAndColumns()

       

      It makes no sense to me why this error pops up, totally randomly, sometimes only after the page loads for the first time and I click directly on the header - any other click sorts ok, sometimes at the second click(changing sort order)...I wasn't able to establish a pattern and to reproduce the error when I want...this is furstrating ! As a visual behaviour, when I get this error, the first row inside the datagrid changes its background color to black.

       

      I also don't know if this error is related to sorting, or is related to smth else, and i got it when sorting..

       

      Did anyone of you encounter this kind of problem ? I googled and didn't found anything helpful about it...i may have omitted smth...

       

      Any help will be much appreciated !

       

      Thanks!

       

      Vlad

        • 1. Re: Datagrid column(s) sorting problem
          Flex harUI Adobe Employee

          Use a debug build and post the full stack trace.

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: Datagrid column(s) sorting problem
            vlad.flore Level 1

            Hi

             

            Thanks for replying

             

            This is what the debugger says:

             

            TypeError: Error #1010: A term is undefined and has no properties.

                at mx.controls.listClasses::ListBase/makeRowsAndColumnsWithExtraRows()[C:\autobuild\3.2.0\fr ameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:1358]

                at mx.controls.listClasses::ListBase/updateDisplayList()[C:\autobuild\3.2.0\frameworks\proje cts\framework\src\mx\controls\listClasses\ListBase.as:3658]

                at mx.controls.dataGridClasses::DataGridBase/updateDisplayList()[C:\autobuild\3.2.0\framewor ks\projects\framework\src\mx\controls\dataGridClasses\DataGridBase.as:581]

                at mx.controls::DataGrid/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\controls\DataGrid.as:1437]

                at mx.controls.listClasses::ListBase/validateDisplayList()[C:\autobuild\3.2.0\frameworks\pro jects\framework\src\mx\controls\listClasses\ListBase.as:3280]

                at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:622]

                at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:695]

                at Function/http://adobe.com/AS3/2006/builtin::apply()

                at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8628]

                at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8568]

             

            For instance, after the page with the flash module loads, and I click on a column, I get the error. This is quite random, sometimes I need a couple of tries to get the error...

             

            If you require more information about it I will try to provide.

             

            Thank you

             

            Vlad