"this" does not refer to the dataGrid, it refers to the parent document, like Application, for example.
I see that sortCompareFunction does not take an event argument, so the only way you will be able to reference the DataGrid is via its id. Tracy -----Original Message----- From: viraf_bankwalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 11:34 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid events Hi, I have a datagrid in which columns have the sortCompareFunction defined. When the method is called "this" appears to refer to the DataGrid as expected (event). The problem that I am having is that the compiler complains if I try to call any of the methods on the datagrid, as the class in which the handler is defined is not a DataGrid. For example, I have the columnIndex and would like to get the column, so I do this.getColumnAt(columnIndex) I tried casting this to DataGrid - this did not work either. Any suggestions on I could access the methods the DataGrid, or in the more general case whichever object this referes to. Thanks. Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/