I'm getting this runtime error which I hope someone can help me with.
Basically, I added a headerRelease event to my DataGrid. The plan is...when a
user clicks a dg column header .... rather than sorting the rows, i plan to
re-populate the datagrid with rows from a different sql database call.
eg
<mx:DataGrid headerRelease="headerClicked(event)" ..
..
public function headerClicked(e:DataGridEvent):void
{
var col:myDGColumn = this.columns[e.columnIndex];
if(col.filter)
{
// make a different database call to populate dg dataprovider
}
}
Now this seems to be working except sometimes (quite often actually) I get the
following runtime error.
TypeError: Error #1010: A term is undefined and has no properties.
at
mx.controls.dataGridClasses::DataGridHeader/mouseOutHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\dataGridClasses\DataGridHeader.as:1078]
Using the debugger, the code is dying on the following if statement (of
mouseOutHandler())
if (visibleColumns[i].sortable)
{
...
in my case visibleColumns.length = 10 and i=10 .....hence the RTE.
Can some one suggest a workaround please
regards
bod