OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: docsaintly on April 06, 2009, 01:52:56 PM

Title: Grid Column Sort
Post by: docsaintly on April 06, 2009, 01:52:56 PM
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.
Title: Re: Grid Column Sort
Post by: owenwengerd on April 06, 2009, 05:28:46 PM
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.
Title: Re: Grid Column Sort
Post by: Fred Tomke on April 06, 2009, 11:21:32 PM
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
Title: Re: Grid Column Sort
Post by: docsaintly on April 07, 2009, 01:27:58 PM
Thanks. Can you tell me where in the help it shows what each imageindex is?
Title: Re: Grid Column Sort
Post by: Fred Tomke on April 08, 2009, 12:22:59 AM
Yes - we can  :)

Have a look here (http://www.opendcl.com/HelpFiles/index.php?&page=Reference/DataType/PictureID.htm).

Fred