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

Suspending a virtual grid

Thread ID:





46747 Jul 19,2006 11:16 PM UTC Jul 21,2006 02:06 AM UTC WinForms 5
Tags: GridControl
Terence Rossow
Asked On July 19, 2006 11:16 PM UTC

Hi there,

I need to force a virtual grid to cease firing its query and save events for a time, and then refresh the entire grid. We have a feature where the structure of a grid can be imported, while that grid is open - and this will affect many other open grids. These other grids need to stay open, but cannot access the data store while it is being changed.

I looked at BeginInit/EndInit, but it doesnt seem to suspend the query events.

Is there a way to do this asside from setting a flag and not carrying out any operations in the query event handlers if the flag is set?


Administrator [Syncfusion]
Replied On July 20, 2006 05:44 AM UTC

Hi Terry,

Please try making the changes between the BeginUpdate() and EndUpdate() methods followed by refreshing the grid. The virtual grid will get refreshed by calling the the ResetVolatileData method, this would be called internally when you call Refresh.


Let me know if this helps.

Terence Rossow
Replied On July 20, 2006 07:06 AM UTC

Thanks for the reply.

Your suggestion doesn''t seem to work. I put a write line in the grids, printing out the name of the function being called, and output "Begin Update" when the BeginUpdate function was called:

Begin Update:


Is there anything else I need to do to make this work?


Administrator [Syncfusion]
Replied On July 20, 2006 02:08 PM UTC

Hi Terry,

This is by design that, Query events will get fired continously. For a non virtual grid, you can refer to the OneTimeOnlyQueryCellInfo sample in the browser samples shipped with the product.

C:\Syncfusion\Essential Suite\Grid\Samples\Performance\OneTimeOnlyQueryCellInfo


Administrator [Syncfusion]
Replied On July 20, 2006 07:36 PM UTC

Instead of using flags to avoid the event handler code, you can also unsubscribe to the events when you want to suspend them and then re-subscribe when you want to start them back up.

Terence Rossow
Replied On July 21, 2006 02:06 AM UTC

Thanks for the reply.

I could''t remove the events, as then our grids cannot paint properly anymore. So what I did was implement a cache of GridStyleInfo objects that is updated as the query events are called. Then when a flag is set the grid simply uses the cache, allowing the data to be updated. Works well as long as you don''t scroll outside the area that was queried for the cache...


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

or the page will be automatically redirected to 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