BoolEdit

The BoolEdit component renders a boolean (true/false) column as either a checkbox or a toggle switch.

<BoolEdit ColumnName="ppp_credithold" />

Editor Type

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" />

Label Position

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

Here is an example that demonstrates the use of a BoolEdit component displayed as a checkbox.

Example

BoolEdit (Extended Properties)

This demonstrates the most common the properties that are availabe to set on the BoolEdit.

Example
Readonly? Required? Disabled? CheckboxSwitch DefaultInline

BoolEdit Class

Parameters

Name
Type
Default
Description
ChildContentRenderFragment?
Child content of the component
ColumnNamestring
Column logical name to bind the editor to from the table record.
Descriptionstring?
Description to be displayed in the tooltip.
Disabledbool?
Should the editor be disabled.
DisplayLabelWhenAvailablebool
True
Specifies whether to display a lable if available.
DisplayTooltipWhenAvailablebool
True
Specifies whether to display a tooltip if available.
DisplayValidationErrorMessagebool
True
Should a validation error message be displayed when the component fails validation?
EditorTypeBoolEditorType
Checkbox
Type of editor to render.
IsVisiblebool
True
Is the editor visible.
Labelstring?
Text to be displayed as a label for the editor.
LabelPositionLabelPosition
Inline
Position of the label
ReadOnlybool?
Should the editor be read-only.
Requiredbool?
Should the value be required.
Valuebool?
Value of the column.
Name: ChildContent
Type: RenderFragment?
Description: Child content of the component
Name: ColumnName
Type: string
Description: Column logical name to bind the editor to from the table record.
Name: Description
Type: string?
Description: Description to be displayed in the tooltip.
Name: Disabled
Type: bool?
Description: Should the editor be disabled.
Name: DisplayLabelWhenAvailable
Type: bool
Default: True
Description: Specifies whether to display a lable if available.
Name: DisplayTooltipWhenAvailable
Type: bool
Default: True
Description: Specifies whether to display a tooltip if available.
Name: DisplayValidationErrorMessage
Type: bool
Default: True
Description: Should a validation error message be displayed when the component fails validation?
Name: EditorType
Type: BoolEditorType
Default: Checkbox
Description: Type of editor to render.
Name: IsVisible
Type: bool
Default: True
Description: Is the editor visible.
Name: Label
Type: string?
Description: Text to be displayed as a label for the editor.
Name: LabelPosition
Type: LabelPosition
Default: Inline
Description: Position of the label
Name: ReadOnly
Type: bool?
Description: Should the editor be read-only.
Name: Required
Type: bool?
Description: Should the value be required.
Name: Value
Type: bool?
Description: Value of the column.

Events

Name
Type
Description
ValueChangedEventCallback<ColumnValueBase>
Gets or sets a callback that updates the bound value.
Name: ValueChanged
Type: EventCallback<ColumnValueBase>
Description: Gets or sets a callback that updates the bound value.

Methods

Name
Parameters
Type
Description
GetValidationErrorsList<string>
Returns a collection of the current validation errors.
Name: GetValidationErrors
Type: List<string>
Description: Returns a collection of the current validation errors.