Getting error while run the checkBox item renderer in advanced datagrid with out data.
Error: Cannot access a property or method of a null object reference.
Please find the below code:
**
public function set listData(value:BaseListData):void
{
_listData=value;
_dataGrid=value.owner as AdvancedDataGrid;
_dataField=(value as AdvancedDataGridListData).dataField;
}
**
here value is comming is null, so i am getting above exception. Please let me know how to fix it.
Thanks,
Ravi
Check for null before trying to access properties of value:
This way _dataGrid and _dataField will just get set to null if value is null, avoiding your runtime error.
Hope that helps.