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.
Unfortunately, activation email could not send to your email. Please try again.

Disable Automatic Sorting when Datachanges

Thread ID:

Created:

Updated:

Platform:

Replies:

35370 Sep 28,2005 12:05 PM Sep 28,2005 07:19 PM Windows Forms 1
loading
Tags: GridControl
Eric Robishaw
Asked On September 28, 2005 12:05 PM

In GridGroupingControl 2.0.5.1 If a user sorts a column, can I disable the behavior that keeps the grid sorted when changes are made? i.e., if I sort by column X, and then begin changing the values in column X, the grid keeps sorting. I want to sort Once and force the user to click the column again to sort again, instead of keeping it sorted with each change. Any ideas?

Administrator [Syncfusion]
Replied On September 28, 2005 07:19 PM

Hi, The grid structures require to have the records always be sorted according to the sort order. Otherwise things will get out of sync. The only way you can get this working is if you do not let the grid engine do the sorting. What you could do is have your own implementation of an IBindingList. This IBindingList should be filled with the data that you want to display in the grid. You could then listen to the click event on the column header and then do a custom sorting yourself. When you handle the sort you could then manually sort your list and after that raise a ListChangedType.Reset event so that the grid knows the records were changed. You should not modify the grid SortColumns collection. If you do it this way the grid will simply display the records in the order as they are in your custom list and when you change contents of a record or add a record it will not need to sorted. It will hoevever not work if you also require grouping columns ... Stefan >In GridGroupingControl 2.0.5.1 > >If a user sorts a column, can I disable the behavior that keeps the grid sorted when changes are made? > >i.e., if I sort by column X, and then begin changing the values in column X, the grid keeps sorting. I want to sort Once and force the user to click the column again to sort again, instead of keeping it sorted with each change. > >Any ideas? >

CONFIRMATION

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.

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.

;