How to: Prevent Individual Cells From Being Edited
This example shows how to prevent end-users from editing values of individual cells. In this example, end-users are not allowed to change a product’s Price, if the product is discontinued.
private void view_ShowingEditor(object sender, ShowingEditorEventArgs e) {
if (e.Column.FieldName != "UnitPrice") return;
e.Cancel = (bool)grid.GetCellValue(e.RowHandle, "Discontinued");
}
Tip
See the complete example to learn more: How to: Prevent Individual Cells From Being Edited