We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridListControl Sorting Capability

I've finally got a GridListControl working like I want with alternating background colors, hidden columns, etc. Thanks for the great postings. I'm in need of the GridListCOntrol to support column sorting. I viewed your example file of the Microsoft ListView performing this, but I also saw that you were expecting this capability to be included in future releases. Can you offer a status, or advice? I'd also like to utilize some form of incremental search depending on what column is clicked with a timer that would clear out the input string after a few seconds and start from the beginning. Any advice or working code (vb.net please if possible, C# makes my head hurt) to accomodate this would be much appreciated.

5 Replies

Administrator June 9, 2003 04:03 PM UTC

Have you thought about using a GridDataBoundGrid with the ListBoxSelectionMode property set? That way, you get sorting without additional work (as long as your datasource supports sorting). (If you don't want the current cell to be colored differently than the rest of the row, hanlde the CurrentCellActivating event and in it, set e.ColIndex = 0).

AC Aaron Ching June 17, 2003 04:19 PM UTC

If I can't use DataBoundGrid for sorting, how can I do sorting for GridListControl? Thanks again for all the great forum support.

Administrator June 17, 2003 05:09 PM UTC

What is your datasource? The GridListControl just displays exactly whst is in your datasource. So, you have to come up with a strategy for sorting your datasource.

AC Aaron Ching June 17, 2003 07:39 PM UTC

My datasource is a simply ArrayList object, similar to the USStates. So I need to do my own sorting algorithms. Thanks.

GL Gavin Lambert January 7, 2004 11:41 PM UTC

Just sort the ArrayList first (before binding it to the control), using its Sort method.
Loader.
Live Chat Icon For mobile
Up arrow icon