Hi,
I would like to set certain cells in the grid to be read-only.
I have tried using the GridStyleInfo.ReadOnly property, but while this prevents editing, it still allows the cursor to enter the cell upon double-click. Thus, I am instead canceling the CurrentCellStartEdit event on certain cells to prevent this.
However, I would like to know if there is any alternative property I can use to make a cell read-only (and cursor does not enter cell upon double-click)?
Thanks in advance!
Omar
HA
haneefm
Syncfusion Team
August 3, 2007 08:11 PM UTC
Hi Omar,
Try setting the CellType property of the gridcell to "Static" and let me know if this helps.
e.Style.CellType = "Static";
Best regards,
Haneef
OM
Omar
August 3, 2007 09:07 PM UTC
Hi,
While setting the CellType to Static did work, I can't really do this because I have a formula in my cell and the celltype is already set to FormulaCell.
I assume the only way around this problem then is to create a custom celltype?
Thanks.
Omar
>Hi Omar,
Try setting the CellType property of the gridcell to "Static" and let me know if this helps.
e.Style.CellType = "Static";
Best regards,
Haneef
HA
haneefm
Syncfusion Team
August 6, 2007 11:00 PM UTC
Hi Omar,
You can try setting the style.Enabled property to false in a Grid FormulaCell or you can handle the CurrentCellStartEditing event and set e.Cancel = true.
Best regards,
Haneef