Category / Section
How to make a cell/row/column non-editable without protecting the worksheet?
1 min read
SfSpreadsheet allows you to disable the editing of any cell, row and column without protecting the worksheet by Cancel the CurrentCellBeginEdit event of SpreadsheetGrid.
C#
Spreadsheet.ActiveGrid.CurrentCellBeginEdit += ActiveGrid_CurrentCellBeginEdit; void ActiveGrid_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs args) { if (args.RowcolumnIndex.RowIndex == 5 && args.RowcolumnIndex.ColumnIndex == 5) args.Cancel = true; }
Sample links: