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

How do I properly reset GridGroupingControl ?

Thread ID:

Created:

Updated:

Platform:

Replies:

20234 Oct 12,2004 11:06 PM UTC Oct 19,2004 09:06 PM UTC WinForms 6
loading
Tags: GridControl
Michael Feinstein
Asked On October 12, 2004 11:06 PM UTC

What is the proper way to reset GridGroupingControl ? I have dataview attached to it, and I want to remove datavew, and reinitalise grid. I tried doing gridGroupingControl1.DataSource = null; but it takes literally minutes ! I can''t find any obvious methods to call to reset it.

Administrator [Syncfusion]
Replied On October 13, 2004 05:24 AM UTC

Hi Michael, We had some issue with resetting grids which we fixed in recent private builds. But try first if it works if you simply call gridGroupingControl1.DataSource = null; gridGroupingControl1.ResetTableDescriptor(); gridGroupingControl1.Refresh(); // if not, try also gridGroupingControl1.Engine.SetSourceList(null); after setting .DataSource = null; If you continue to have trouble please open a support incident to obtain a latest private build. Thanks, Stefan

Michael Feinstein
Replied On October 13, 2004 04:44 PM UTC

Doing just >gridGroupingControl1.DataSource = null; >gridGroupingControl1.ResetTableDescriptor(); >gridGroupingControl1.Refresh(); Did not help, but revealed a problem somewhat - the time is spent in Refresh() function. Adding >gridGroupingControl1.Engine.SetSourceList(null); Removed this problem, however now the program is slow second time I initialise the grid. The code for initalization is: DataView dataViewOrdersForSelectedBin = new DataView(dataSet.Orders); gridGroupingControlOrders.TableModel.BeginUpdate(); gridGroupingControlOrders.DataSource = dataViewOrdersForSelectedBin; gridGroupingControlOrders.TableDescriptor.Relations.Clear(); gridGroupingControlOrders.TableModel.EndUpdate(); First time it works nice and fast, second time (after clearing grid in a way suggested above) program spends 30+ seconds in EndUpdate() call, with CPU pegged at 100%

Administrator [Syncfusion]
Replied On October 15, 2004 10:36 PM UTC

Any chance I can get a reply to the problem ? >Doing just > >>gridGroupingControl1.DataSource = null; >>gridGroupingControl1.ResetTableDescriptor(); >>gridGroupingControl1.Refresh(); > >Did not help, but revealed a problem somewhat - the time is spent in Refresh() function. > >Adding > >>gridGroupingControl1.Engine.SetSourceList(null); > >Removed this problem, however now the program is slow second time I initialise the grid. > >The code for initalization is: > >DataView dataViewOrdersForSelectedBin = new DataView(dataSet.Orders); >gridGroupingControlOrders.TableModel.BeginUpdate(); >gridGroupingControlOrders.DataSource = dataViewOrdersForSelectedBin; >gridGroupingControlOrders.TableDescriptor.Relations.Clear(); >gridGroupingControlOrders.TableModel.EndUpdate(); > >First time it works nice and fast, second time (after clearing grid in a way suggested above) program spends 30+ seconds in EndUpdate() call, with CPU pegged at 100%

Administrator [Syncfusion]
Replied On October 15, 2004 10:49 PM UTC

Sorry for missing your post. If you want a guaranteed reply, you should use our Direct Trac support system which is Syncfusion''s primary support venue. So this is the exact code you are using. gridGroupingControlOrders.TableModel.BeginUpdate(); gridGroupingControlOrders.DataSource = null; gridGroupingControlOrders.ResetTableDescriptor(); gridGroupingControlOrders.Engine.SetSourceList(null); gridGroupingControlOrders.TableDescriptor.Relations.Clear(); DataView dataViewOrdersForSelectedBin = new DataView(dataSet.Orders); gridGroupingControlOrders.DataSource = dataViewOrdersForSelectedBin; gridGroupingControlOrders.TableModel.EndUpdate(); gridGroupingControlOrders.Refresh(); And when you execute this code the second time, the refresh takes a long time. Are there any exceptions being thrown during this long pause? (You can check the output window, or set the debugger to break on exception).

Administrator [Syncfusion]
Replied On October 16, 2004 07:40 AM UTC

Hi Michael, I am also sorry for not replying. We have made fixes especially in this area and if you continue to have problems you should open a dtrac incident so that we can send you a latest private patch. Thanks, Stefan

Michael Feinstein
Replied On October 19, 2004 09:06 PM UTC

I was running slightly different code (2 methods - close and open). I changed code to look excatly as the one above and the slowness on the second run is still there, now it''s in "EndUpdate()" method. I will go ahead and submit Incident.

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.

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

;