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.


Thread ID:





12781 Apr 12,2004 02:08 PM Apr 12,2004 03:14 PM Windows Forms 1
Tags: GridControl
Asked On April 12, 2004 02:08 PM

I am looking for some documentation on the BeginUpdateOptions. Specifically, BeginUpdateOptions.Invalidate. I have the following code, which I am trying to optimize when I want to refresh the "viewable" portion of a grid. Thanks, STeve this.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.Invalidate); this.RefreshRange(this.ViewLayout.VisibleCellsRange,GridRangeOptions.None,true); this.EndUpdate(true);

Administrator [Syncfusion]
Replied On April 12, 2004 03:14 PM

Normally you do not call RefreshRange within a Begin/End Update block. The idea of this block is to turn off the painting in this block. If you use this code, this.gridControl1.BeginUpdate(); this.gridControl1[2,1].Text = "aaaaa"; this.gridControl1[3,1].Text = "aaaaa"; this.gridControl1[4,1].Text = "aaaaa"; this.gridControl1[5,1].Text = "aaaaa"; this.gridControl1.EndUpdate(); then you will not see any changes until those cells are forced to repaint (maybe by dragging the form off/on the display, or by explicitly calling gridControl1.Refresh or RefreshRange. But if you use this code, this.gridControl1.BeginUpdate(Syncfusion.Windows.Forms.BeginUpdateOptions.Invalidate); this.gridControl1[2,1].Text = "aaaaa"; this.gridControl1[3,1].Text = "aaaaa"; this.gridControl1[4,1].Text = "aaaaa"; this.gridControl1[5,1].Text = "aaaaa"; this.gridControl1.EndUpdate(true); the cells get redrawn when the EndUpdate is called. The Invalidate option means that regions are marked invalid instead of being redrawn. Then on the EndUpdate call, a call to Control.Update is made that forces the paint to take place.


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.