Skip to main content
All docs
V25.1
  • DxToolbarDataMappingBase.Checked Property

    Specifies whether an item is checked. Map this field to a data source field.

    Namespace: DevExpress.Blazor.Base

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public string Checked { get; set; }

    Property Value

    Type Default Description
    String null

    The data source field.

    Remarks

    The following code snippet binds the Toolbar to the collection of FormatItem objects. Each object can have child objects. The code specifies the Children, Text, and Checked mappings to adjust the Toolbar’s data model to the specified data source.

    <div class="card p-2">
        <DxToolbar Data=@FormatItem.ToolbarItems ItemClick=@OnItemClicked>
            <DataMappings>
                <DxToolbarDataMapping Name="ValueName" Text="ValueName" Children="Values" Checked="IsChecked" />
                <DxToolbarDataMapping Text="Value" Level="1" />
            </DataMappings>
        </DxToolbar>
    </div>
    
    @code {
        void OnItemClicked(ToolbarItemClickEventArgs args) {
            if (args.ItemName == "Align") {
                ((FormatItem)args.Info.Data).ChangeChecked();
            }
        }
    }
    

    Bound to Hierarchical Data Toolbar

    Refer to the DxToolbarDataMappingBase class description for more information and examples.

    See Also