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.

GridDataBoundGrid Tree Grid Sorting Problem.

Thread ID:

Created:

Updated:

Platform:

Replies:

16065 Jul 5,2004 10:57 PM Jul 6,2004 01:04 AM Windows Forms 1
loading
Tags: GridControl
Maqsood Ahmed
Asked On July 5, 2004 10:57 PM

I am working working on a GDBG that has Hierarchical View (Tree view) and it is bound to 2 different views. I switch between views on the basis of an event. now when I sort GDBG using SortBehaviour = SingleClick. The whole grid collapses first and then start to sort. Is there anyway to sort a Grid without affecting its current state??

Administrator [Syncfusion]
Replied On July 6, 2004 01:04 AM

There is no property setting that allows this to happen. In the case of sorting, the datasource fires an IBindingList.ListChanged event with a ListChanged.Reset setting. This causes the nodes to reset. To handle this, you can save teh state before sorting, and reset it after sorting. One problem is that the reset also cancels any grid.BeginUpdate which then shows the nodes changing which is not good. One way to handle this is use a Win32 API directly freeze the painting instead of using grid.BeginUpdate. Here is a sample that works around this problem. It adds a new property to a derived grid that adds a second way to freeze the screen painting through a Win32 API call. This techique is discussed in one of our Windows Forms FAQ, http://www.syncfusion.com/faq/winforms/search/637.asp

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.

;