The sorting of the collection is done in the headerReleaseEvent.  I'd
love to try the updateSortIndexAndDirection method of DataGrid.as, but
that is marked private in beta 3 source.  I even tried to call the
method in case the source was incorrect.  But it looks like I don't
have access to it. 

On the flip side, I was able to see that the modelChangedHandler() in
DataGrid does call the updateSortIndexAndDirection() for me.  However,
this does not work if we want secondary and tertiary sorting. (per
example from doc mentioned before). In the
vupdateSortIndexAndDirection() method, it checks to see if you have
more than one field specified in the sort.  If so, then basically
break out and leave the sortIndex variable at -1 resulting in no sort
arrow appearing.  Couldn't this have just put the arrow on the first
sortField rather than stopping?

So for now, if I want a sort arrow, I can only support sorting on a
single field (or I need to reimplement how the placeSortArrow()..)  My
preference is to not reimplement.  If you have other ideas, they are
much appreciated.

Thanks,
-scott


--- In [email protected], "Manish Jethani"
<[EMAIL PROTECTED]> wrote:
>
> On 5/12/06, Scott Romer <[EMAIL PROTECTED]> wrote:
> > I am working on a version of adding generic sorting on my class that
> > extends DataGrid.  The "placeSortArrow" method of DataGrid is marked
> > as protected, so I can call the method, but the arrow will never show
> > up because sortIndex has to be set and is marked private.  In
> > addition, I can't set some of the other needed variables (i.e.
> > sortDirection on the dataGrid).
>
> For the sort arrow to show up, you have to actually sort the
> collection. See the updateSortIndexAndDirection method in DataGrid.as
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to