WinUI コントロール
編集の無効化
コントロール > FlexGrid > 編集 > 編集の無効化

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.

Disable Row/Column Editing

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#
コードのコピー
// 行編集を無効にします
flexGrid1.Rows[2].IsReadOnly = true;
// 列の編集を無効にします
flexGrid1.Columns[2].IsReadOnly = true;

Disable Grid Editing

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#
コードのコピー
// グリッド編集を無効にします
flexGrid1.IsReadOnly = true;