FlexGrid, by default, allows end-user to edit the cell values at runtime. However, with FlexGrid, you can easily manage how much control you want to give to the end-users using various properties provided by the FlexGrid.
To disable the editing of a particular row or column of the WinUI FlexGrid, you can set the IsReadOnly property of GridRow or GridColumn class to true as shown in the code below.
C# |
Copy Code
|
---|---|
// Disable Row Editing flexGrid1.Rows[2].IsReadOnly = true; // Disable Column Editing flexGrid1.Columns[2].IsReadOnly = true; |
To disable editing of the whole WinUI FlexGrid, you need to set IsReadOnly property of the FlexGrid class to true as shown in the code below.
C# |
Copy Code
|
---|---|
// Disable Grid Editing flexGrid1.IsReadOnly = true; |