Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagrid sorting

Status
Not open for further replies.

kgaard

Programmer
Nov 23, 2003
18
US
hi all..

having an issue with a datagrid sort -

I need to sort on one column, and then another -
ie: sort all on "time", retain that sort, and then sort on "score".

var pbpsort = new Array( "TIME", "SCORE" );
playbyplayGrid.sortItemsBy( pbpsort, Array.NUMERIC );

the problem i'm having is: I need to sort time ascending, and score descending. any ideas? this one is a killer.

thanks in advance!

 
Let me know if this helps..

The array has a sorting property which lets you decide to sort ascending or descending.
if you look at the help section for sort in flash8.
 
maybe if I explain my application it will make more sense :)

I'm building a live play by play generator that runs from an XML file to follow live basketball games.

i can get the array to sort - no problem.. however, I would like sort the TIME column ascending(so that the most recent play at the top) and then(retain the TIME SORT)and sort the SCORE column descending (so that the most recent score is at the top)

the problem, really is where points are scored and the clock doesnt change (foul shots, mainly) - it sorts both TIME and SCORE ascending, so essentially the lowest score is on top for that particular time on the clock.

i'm sure thats about as clear as mud. my apologies... but perhaps that will help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top