2 Replies Latest reply on Jan 7, 2010 1:29 PM by wendy888

    How to allow the click only on datagrid heading?


      I have four datagrid in a.mxml file those are display only ( editable='false'). When user clicks on anywhere in a datagrid, it comes to b.mxml that shows the only the selected datagrid and this datagrid is editable.

      I have the following issue:

         If I click on the datagrid heading, it works fine, but if anywhere other than the heading, it gave me error:

         Error #1009: Cannot access a property or method of a null object reference.

         Use debug to trace the error, it happens at DataGrid.as that focusmanager is null.


         The error does not happen every time. sometimes, it works fine.

         Should I set only allow user to click on the datagrid heading? how to set it?

         I did set focus on the datagrid at the b.mxml when it initialize, but it did not work.



         Please help!

         Thank you in advance