AD
Administrator
Syncfusion Team
April 12, 2004 07:14 PM UTC
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.