Grid Column Sort

Started by docsaintly, April 06, 2009, 01:52:56 PM

Previous topic - Next topic

docsaintly

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

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.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

docsaintly

Thanks. Can you tell me where in the help it shows what each imageindex is?

Fred Tomke

Yes - we can  :)

Have a look here.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]