Started by docsaintly ·
2009-04-06 20:52 UTC ·
4 replies · SMF topic #702
docsaintly
2009-04-06 20:52 UTC
I noticed that the grid view has an option to sort, but it's not very customizeable (at least I don't know how to). Is there any way to allow the user to click a column header and have the grid view sort the contents accordingly? It seems if there was a built in function for this it would be much quicker than dumping all the data to lisp, sorting, and then returning it to the grid view.
owenwengerd
2009-04-07 00:28 UTC
Take a look at the SortNumericCells and SortTextCells methods for the Grid control. It doesn't sort automatically, but you can call these functions from your OnColumnClick event handler.
fred_tomke
2009-04-07 06:21 UTC
Hi, I only want to append that it depends on your code saving the latest sorted column id and its sort direction (ascending / descending) and at least the column image to show the sort order.
Fred
docsaintly
2009-04-07 20:27 UTC
Thanks. Can you tell me where in the help it shows what each imageindex is?
fred_tomke
2009-04-08 07:22 UTC
Yes - we can :)
Have a look
{2}.
Fred