I've been having problems editing data on a datagrid. My
dataProvider is an array of objects and within that object I have a
hashtable of objects that I want to display on the grid as a row.
Now this hashtable might contain one or more items. When I set the
dataProvider I create the fixed DataGridColumns and then I start
creating the dynamic ones.
I extended DataGridColumn so I can add the column information
that I need in order to retrieve the data for that column.
I add an itemRenderer as follows:
if (data==null) return "";
var dg:DataGrid = (listData) ? DataGrid(listData.owner) :
var column:AssignmentDataGridColumn = (dg) ?
dg.columns[listData.columnIndex] as AssignmentDataGridColumn :
var classStudentLink:ClassStudentLink=data as
The method classStudentLink.getScore(column.assignment.id) is
what goes into the hashtable and retrieves the data for that cell.
My problem is when I try to edit the column. When I click on the
column it goes to the last item on the cell and then when I click
out of it I get:
ReferenceError: Error #1069: Property null not found on
com.ivmath.lp.bo.gb.ClassStudentLink and there is no default value.
Now I can't set the dataField on the datagridColumn because
the property doesn't exist on the class since the columns are
dynamically created which is why I use a hashtable.