I have read-only columns in my grid.
when the user click on read only column, grid allowm them to type one character.
How to avoid this?
If i use the following then user doesn’t see the focus on the cell
private void gdbgMeritSummaryGrid_CurrentCellActivating_1(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellActivatingEventArgs e)
e.ColIndex = 0;
ADAdministrator Syncfusion Team May 2, 2005 02:25 PM
What version of the grid you using? This is not a known problem in the recent releases provided you are setting the ReadOnly property of the GridBoundColumn.StyleInfo object for the columns.
If you want to try to work around this problem in the version you are using, then you can subscribe to teh CurrentCellStartEditing event, and there set e.Cancel = true if grid.CurrentCell.ColIndex points to a column that you want to be readonly.
ADAdministrator Syncfusion Team May 2, 2005 03:27 PM
I am using the version # 220.127.116.11.
I am using the following code to make column readonly
// settting columns readonly
foreach (GridBoundColumn column in gdbgMeritSummaryGrid.GridBoundColumns)
column.ReadOnly = true;
Please let me know if there is something that i need to do except using other solution suggested by you.
ADAdministrator Syncfusion Team May 2, 2005 05:03 PM
Where are you doing that code? I tried it in Form.Load, and did not see the problem you described. Here is the sample I tried.
Do you see the problem in this sample? Can you upload a sample showing the problem?
ADAdministrator Syncfusion Team May 2, 2005 06:06 PM
I am also doing it in formload event.
AS per your suggestion i did coding in CurrentCellStartEditing event and it is working.
TATom AbrahamMay 23, 2005 03:32 PM
I have the same issue in GridControl. In form load, I set _grid.ColStyles(1).ReadOnly = True. However, I can type a character into the "read only" cells that is not saved when I leave the cell.
ADAdministrator Syncfusion Team May 23, 2005 04:56 PM
This is a defect in 18.104.22.168. Is that the version you are using?
Until the next release, you can use the CurrentCellStartEditing event to avoid this problem.