2 Replies Latest reply on Sep 6, 2011 10:16 AM by Flex harUI

    spark datagrid GridItemRenderer   Cannot access a property or method of a null object reference

    Julian Montes


      I have created a spark datagrid  with a  griditemrender,  but, when  my application  start and  dataprovider  is  null, and  not have  data.


      Has the error


      "Cannot access a property or method of a null object reference"


      when have data  dont have problem


      I was  used for the griditemrender :


      prepare  method ,   updateComplete, creationComplete, and all them have the same  error  on aplication  starts


      any idea  from   this error?


      +++  my itemrender  +++++


      <?xml version="1.0" encoding="utf-8"?>


      <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"








                  override public function prepare(hasBeenRecycled:Boolean):void




                      valueDisplay.selected = data[column.dataField] as Boolean;








          <s:CheckBox id="valueDisplay"/>