Probably some timing bug. Maybe use callLater to delay the changing of the data or send a fake mouseOut event.
Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: [email protected] [mailto:[email protected]] On Behalf Of bhaq1972 Sent: Monday, November 30, 2009 2:43 PM To: [email protected] Subject: [flexcoders] Re: RTE - DataGridHeader/mouseOutHandler Yes. The initial dataProvider was showing all orders from the ORDER table (eg select * from ORDERS). When a user clicks the column header I want to only show orders a specific type of order (eg select * from ORDERS where OrderType = 'short') btw the column has an Image itemRenderer eg <myDataGridColumn dataField="OrderType" itemRenderer="mx.controls.Image" ../> --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex Harui <aha...@...> wrote: > > Is the column set changing based on the new data? > > Alex Harui > Flex SDK Developer > Adobe Systems Inc.<http://www.adobe.com/> > Blog: http://blogs.adobe.com/aharui > > From: [email protected]<mailto:flexcoders%40yahoogroups.com> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On > Behalf Of bhaq1972 > Sent: Monday, November 30, 2009 8:26 AM > To: [email protected]<mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] RTE - DataGridHeader/mouseOutHandler > > > > 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 >

