BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void button1_Click(object sender, System.EventArgs e) { gridControl1.Focus(); gridControl1.CurrentCell.MoveTo(-1, -1); gridControl1.ClearCells(GridRangeInfo.Table(), true); gridControl1.RowCount = 0; MessageBox.Show("EmptyGrid"); gridControl1.Focus(); gridControl1.RowCount = 20; }You might use the Debug|Exceptions menu item to set Common Language Runtime exceptions to break into teh debugger to see if there is some type of exception being thrown that would interfere with this behavior. Also, when you perform this code, what is teh state of the grid at that point? Is this code being call from an event handler that might not expect the RowCount to change? If you can reproduce the behavior in a sample project, you can submit in a Direct Trac support incident, and we will take a look at it to see if we can spot what is going on.
> private void button1_Click(object sender, System.EventArgs e) > { > gridControl1.Focus(); > gridControl1.CurrentCell.MoveTo(-1, -1); > gridControl1.ClearCells(GridRangeInfo.Table(), true); > gridControl1.RowCount = 0; > > MessageBox.Show("EmptyGrid"); > > gridControl1.Focus(); > gridControl1.RowCount = 20; > } >> > You might use the Debug|Exceptions menu item to set Common Language Runtime exceptions to break into teh debugger to see if there is some type of exception being thrown that would interfere with this behavior. > > Also, when you perform this code, what is teh state of the grid at that point? Is this code being call from an event handler that might not expect the RowCount to change? > > If you can reproduce the behavior in a sample project, you can submit in a Direct Trac support incident, and we will take a look at it to see if we can spot what is going on.