Skip to main content
All docs
V26.1
  • DxToolbarDataMappingBase.RenderStyle Property

    Specifies an item’s render style. Map this property to a data source field.

    Namespace: DevExpress.Blazor.Base

    Assembly: DevExpress.Blazor.v26.1.dll

    Declaration

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

    Property Value

    Type Default Description
    String null

    The field name.

    Remarks

    Assign the name of a data source field that contains ButtonRenderStyle values to this property to apply predefined color styles to toolbar items.

    The following code snippet maps the RenderStyle field from the data source to the toolbar item’s appearance:

    <DxToolbar Data="@Data">
        <DataMappings>
            <DxToolbarDataMapping Text="Text"
                                  RenderStyle="RenderStyle" />
        </DataMappings>
    </DxToolbar>
    
    @code {
        List<ToolbarDataItem> Data = new() {
            new() {
                Text = "Save",
                RenderStyle = ButtonRenderStyle.Primary
            },
            new() {
                Text = "Cancel",
                RenderStyle = ButtonRenderStyle.Secondary
            }
        };
    }
    
    See Also