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

Gridgroupingcontrol not sorting

Thread ID:





98764 Mar 28,2011 12:37 PM UTC Mar 30,2011 11:41 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Grouping
Florian Capolunghi
Asked On March 28, 2011 12:37 PM UTC


We are using a gridGroupingControl in a C# WindowsForm application.

Our data is stored in a SortedList where T is a custom class.
We bind the data to the grid with the following code :

gridGroupingControl1.dataSource = new List(from x in slist.Values where x.attrib = "test" select x);

We then have real time updates on the data. The grid doesn't refresh naturally but we use
gridGroupControL1.Table.SimulateListChanged(new ListChangedEventArgs(ListChangedType.Reset,0));
and the refresh is fine.

We then sort the data by clicking on a column header.
The problem is the grid won't resort automatically when the data is updated. Sorting seems very natural in syncfusion samples, but every sample involve Dataset instead of List.
At the moment we use an ugly code to perform the dynamic sorting, which consist in removing sortedcolumn and reseting it every second. But this last solution is very poor in terms of performance.

Do you have any ideas on why our grid doesn't re-sort when dataSource is updated ?

Thanks in advance.

Jisha Joy [Syncfusion]
Replied On March 30, 2011 11:41 AM UTC

Hi Florian,

The custom collection must implement INotifiedPropertyChanged interface used to make the collection aware of any property changes. Please refer to the following browser sample for more details,

...\Windows\Grid.Grouping.Windows\Samples\2.0\Custom Collections\IBindingList Demo\cs



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