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. Image for the cookie policy date

Refresh() and RefreshRange()

What is the difference between refreshrange and refresh for cells that are in both the range of the refresh? For instance, if I do a RefreshRange(1,1,1,1) and do a Refresh() (and this cell is viewable) there seems to be a difference in which Refresh re-paints immediately, but refreshrange does not re-paint the active cell. Please advise on the technical differences. Thanks, Steve

4 Replies

Administrator November 21, 2003 11:22 PM UTC

There is an overload of RefreshRange that allows you to force the currentcell to be refreshed. Refresh actually does a ResetVolatileData call and a UpdateScrollbars call in addition to painting the visible grid. RefreshRange does not do these additional calls.

TF Terry Foster January 28, 2004 07:09 PM UTC

In relation to this, I want to be able to BeginUpdate, perform operations that require one or more ranges to be refreshed (not the entire grid, for speed reasons) and then EndUpdate. I''ve noticed that any RefreshRange calls made between BeginUpdate and EndUpdate are essentially ignored for my virtual grid, but Refresh is not. Is there a reason for this? Is there a way for me to get around this? Thanks, Terry

Administrator January 28, 2004 08:52 PM UTC

Use BeginUpdateOptions in the BeginUpdate call. this.gridControl1.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.Invalidate); // do your updating calling RefreshRange.... this.gridControl1.EndUpdate(true);

TF Terry Foster February 2, 2004 12:30 PM UTC

Excellent - perfect. Thanks.
Loader.
Live Chat Icon For mobile
Up arrow icon