WinUI コントロール
CheckBox
コントロール > FlexGrid > > エディタ > CheckBox

Display Checkbox for Boolean Values

FlexGrid, by default, uses the checkbox editor for representing the Boolean values. That is, when the DataType property of a Row or Column object is set to Bool type, a checkbox appears in the cells and user can toggle the value of an editable cell simply by clicking it.

To disable this default behavior and display text value instead of a checkbox in a Bool type, you can set the Format property of Row or Column object to string values.

Use the code below to set checkbox type editor in a WinUI FlexGrid column and configure it further.

C#
コードのコピー
//チェックボックスを表示する代わりに文字列値を表示します
flexGrid1.Columns["Active"].Format = "Yes;No";