This means that the first value in the dataProvider has a null value, it shouldn't be because a random field in the middle is null. You would workaround this by using a sortCompareFunction for the field OR by handling the headerRelease by setting up a SortField with the proper information and then assigning it to the dataProvider's Sort (which you may also need to create); then don't forget to preventDefault on the headerPressed event :-)
Matt -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Sent: Monday, April 17, 2006 8:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Newbie Question: Error being thrown on Grid Sort Using Flex Beta2, I'm populating a grid via XML through an HTTPService component. Grid populates fine, but, if I sort the grid with a column click, and any of the cells are Null, the grid throws the following error: Error: Cannot determine comparator for SortField with name 'LastName' at mx.collections::SortField/http://www.adobe.com/2006/flex/mx/internal::in itCompare() at mx.collections::Sort/::initSortFields() at mx.collections::Sort/sort() at mx.collections::ListCollectionView/mx.collections:ListCollectionView::in ternalRefresh() at mx.collections::ListCollectionView/refresh() at mx.controls::DataGrid/sortByColumn() at mx.controls::DataGrid/::headerReleaseHandler() at flash.events::EventDispatcher/dispatchEvent() at mx.controls::DataGrid/mouseUpHandler() Question is: Should I prevent NULLs with some server side kludge? Should I implement a SortField handler that is "null-safe" ? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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/