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

Best way to update a range of cells

Thread ID:





36958 Nov 14,2005 05:08 AM UTC Nov 15,2005 03:37 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On November 14, 2005 05:08 AM UTC

I need to update a range of cells. I’m using model.GetCells to put the styles into a GridStyleInfoStoreTable. I’m then modifying the table’s contents and using model.SetCells to update the data. I’m sandwiching this between model.BeginUpdate() and model.EndUpdate() calls. I’m also trying one of: model.Refresh(), gridControl.Refresh(), and gridControl.RefreshRange(range) after the EndUpdate(). The begin/end updates do help with performance when updating the data; even for small sizes the difference is noticeable. Unfortunately, I’m still getting intermittent occurrences of updated cells not showing their new content except when I explicitly select the range. What’s the best way to update the contents of a regular grid? P.s: If it matters, my updates may also have row/column insertions.

stanleyj [Syncfusion]
Replied On November 14, 2005 06:33 AM UTC

Hi Jack, Refresh, RefreshRange, Invalidate and InvalidateRange has to refresh. Here is a sample that is working well. If you can upload your sample, we will look the issue here. Best regards, Stanley

Administrator [Syncfusion]
Replied On November 15, 2005 03:37 PM UTC

Hi Stanley, Turns out I wasn''t always calling the grid update routine in my code. Once I made the fix, everything is working as it should. Sorry to have wasted your time. My update routine does the following: beginupdate, getcells, setcells, endupdate, refreshrange. Is that most efficient way of doing an update to a range of cells or do you guys recommend something else? Thanks.


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