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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sorting with an Array-datasource

Thread ID:





38413 Dec 12,2005 04:41 PM UTC Dec 12,2005 11:53 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On December 12, 2005 04:41 PM UTC

Hi, sorting (by clicking on a columns header) doesn''t work if the datasource is an array of objects (the columns are the object''s properties). Is there a way to do the sorting with an array as datasource? I can''t use a table :-(. Greetings Falk

Administrator [Syncfusion]
Replied On December 12, 2005 11:53 PM UTC

The GridDataBoundGrid only directly sorts datasources that implement IBindingList. If you use a GridGroupingControl, then that grid directly supports sorting for any IList datasource. If you want to support sorting in GridDataBoundGrid with an ArrayList Datasource, then one way to do this is to have the objects in the arraylist implemeht IComparable. Here is a little sample showing one way you could od this. http://www.syncfusion.com/Support/user/uploads/ArrayListSortInGDBG_6e21d24c.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon