2X faster development
The ultimate WPF UI toolkit to boost your development speed.
SfDataGrid allows you to disable the edit mode. You can do so by setting the AllowEditing property as False. Conversely, the AddNewRow is always editable, despite AllowEditing being false. This is because, AddNewRow allows you to add rows in the runtime to enter new records in the DataGrid control. On the other hand, you can disable the edit mode of AddNewRow in SfDataGrid, by handling the CurrentCellBeginEdit event. To set a particular column as read-only, you can specify the AllowEditing property of that column alone as False. The following code example demonstrates how to disable the edit mode of a column in AddNewRow by handling CurrentCellBeginEdit event. C#
The above code makes the selected columns read-only, by cancelling the editing feature of the columns, for which the AllowEditing property is set as false. Specifying AllowEditing as False for the grid disables the edit mode of the entire AddNewRow.
Screenshot: Figure 1: Disable the edit mode of AddNewRow Sample Link:
|
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.