Back to Devexpress

DxSplitButton.SubmitFormOnClick Property

blazor-devexpress-dot-blazor-dot-dxsplitbutton-26c974be.md

latest2.1 KB
Original Source

DxSplitButton.SubmitFormOnClick Property

Specifies whether the primary button 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 primary to submit a form; otherwise, false.

|

Remarks

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

Follow the steps below to create a similar button:

  1. Place the <DxSplitButton> component inside an EditForm.

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

  3. Set the primary button’s SubmitFormOnClick property to true.

razor
<EditForm>
    @* ... *@
    <DxSplitButton SubmitFormOnClick="true"
                   Text="Submit"
                   RenderStyle="ButtonRenderStyle.Secondary">
        <Items>
            <DxDropDownButtonItem Text="Action" />
            <DxDropDownButtonItem Text="Another action" />
            <DxDropDownButtonItem Text="Something else here" />
        </Items>
    </DxSplitButton>
     @* ... *@
</EditForm>

See Also

DxSplitButton Class

DxSplitButton Members

DevExpress.Blazor Namespace