AD
Administrator
Syncfusion Team
June 3, 2004 05:23 AM UTC
Does the grid have focus when your form first appears? If so, I suspect the problem is that cell 1,1 has already be set up to be the current cell before the PrepareViewStyleInfo is hit when the grid is being drawn. This means the style.Enabled = false does not take effect because cell 1,1 is already set to be the current one before it is drawn.
If this is the case, you can call grid.CurrentCell.MoveTo to explicitly position the currentcell initially to a cell that is enabled (maybe 1,2), or you can use this code so no cell is current when the grid first appears.
this.gridDataBoundGrid1.CurrentCell.MoveTo(-1, -1);