Back to Devexpress

DxButtonGroupItem.SubmitFormOnClick Property

blazor-devexpress-dot-blazor-dot-dxbuttongroupitem-5c2767ee.md

latest2.1 KB
Original Source

DxButtonGroupItem.SubmitFormOnClick Property

Specifies whether the processed button group item can submit a form.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(false)]
[Parameter]
public bool SubmitFormOnClick { get; set; }

Property Value

TypeDefaultDescription
Booleanfalse

true to allow the item to submit a form; otherwise, false.

|

Remarks

You can use the button group item to submit a form. This behavior is equivalent to the HTML type=”submit” button’s behavior.

Follow the steps below to create a similar button:

  1. Place the <DxButtonGroup> component inside an EditForm and populate the component’s item collection with DxButtonGroupItem objects.

  2. Set an item’s SubmitFormOnClick property to true.

  3. Define a data model with data annotation attributes. For additional information, refer to the following help topic: Validate Input.

razor
<EditForm>
    @* ... *@
    <DxButtonGroup>
        <Items>
            <DxButtonGroupItem Text="Submit"
                            SubmitFormOnClick="true"
                            RenderStyle="ButtonRenderStyle.Secondary" />
        </Items>
    </DxButtonGroup>
     @* ... *@
</EditForm>

See Also

DxButtonGroupItem Class

DxButtonGroupItem Members

DevExpress.Blazor Namespace