The BoolEdit component renders a boolean (true/false) column as either a checkbox or a toggle switch.
<BoolEdit columnName="ppp_credithold" /><BoolEdit ColumnName="ppp_credithold" />Set EditorType to choose between BoolEditorType.Checkbox (default) or BoolEditorType.Switch.
{/* Checkbox (default) */}
<BoolEdit columnName="ppp_credithold" editorType={BoolEditorType.Checkbox} />
{/* Toggle switch */}
<BoolEdit columnName="ppp_credithold" editorType={BoolEditorType.Switch} /><!-- Checkbox (default) -->
<BoolEdit ColumnName="ppp_credithold" EditorType="BoolEditorType.Checkbox" />
<!-- Toggle switch -->
<BoolEdit ColumnName="ppp_credithold" EditorType="BoolEditorType.Switch" />Set LabelPosition to control where the label is displayed. LabelPosition.Inline (default) places the label next to the control, while LabelPosition.Default places it above.
<BoolEdit columnName="ppp_credithold" labelPosition={LabelPosition.Default} /><BoolEdit ColumnName="ppp_credithold" LabelPosition="LabelPosition.Default" />A basic BoolEdit bound to a boolean column.
Use the controls below to explore the available properties.
Name | Type | Default | Description |
|---|---|---|---|
ChildContent | RenderFragment? | Child content of the component | |
ColumnName* | string | Column logical name to bind the editor to from the table record. | |
Description | string? | Description to be displayed in the tooltip. | |
Disabled | bool? | Should the editor be disabled. | |
DisplayLabelWhenAvailable | bool | True | Specifies whether to display a lable if available. |
DisplayTooltipWhenAvailable | bool | True | Specifies whether to display a tooltip if available. |
DisplayValidationErrorMessage | bool | True | Should a validation error message be displayed when the component fails validation? |
EditorType | BoolEditorType | Checkbox | Type of editor to render. |
IsVisible | bool | True | Is the editor visible. |
Label | string? | Text to be displayed as a label for the editor. | |
LabelPosition | LabelPosition | Inline | Position of the label |
ReadOnly | bool? | Should the editor be read-only. | |
Required | bool? | Should the value be required. | |
Value | bool? | Value of the column. |
ChildContentColumnName*DescriptionDisabledDisplayLabelWhenAvailableDisplayTooltipWhenAvailableDisplayValidationErrorMessageEditorTypeIsVisibleLabelLabelPositionReadOnlyRequiredValueName | Type | Description |
|---|---|---|
ValueChanged | EventCallback<ColumnValueBase> | Gets or sets a callback that updates the bound value. |
ValueChangedName | Parameters | Type | Description |
|---|---|---|---|
GetValidationErrors | List<string> | Returns a collection of the current validation errors. |
GetValidationErrors