|
<SfButton Type="submit" CssClass="e-flat" IsToggle="true" IsPrimary="true" Content="Submit" Disabled="true"></SfButton>
<SfButton Type="button" CssClass="e-flat" IsToggle="false " IsPrimary="false" Content="Cancel" OnClick="@CLoseDialog"></SfButton> |
|
@using Syncfusion.Blazor.Buttons
<form>
<SfButton Content="Add" HtmlAttributes="htmlAttr"></SfButton>
<SfButton Content="Edit" HtmlAttributes="htmlAttr"></SfButton>
<SfButton Content="Delete" HtmlAttributes="htmlAttr"></SfButton>
<br /><br />
<SfButton Content="Submit" ></SfButton>
</form>
@code {
private Dictionary<string, object> htmlAttr = new Dictionary<string, object>()
{
{ "type", "button" }
};
}
|
|
@using Syncfusion.Blazor.Buttons
<form>
<SfButton Content="Add" Type="button"></SfButton>
<SfButton Content="Edit" Type="button"></SfButton>
<SfButton Content="Delete" Type="button"></SfButton>
<br /><br />
<SfButton Content="Submit"></SfButton>
</form> |
Dear Support ,
does it seem that the SfButton component does not currently have a Type property? Is using Dictionary the only solution?
Hi Szoke,
Query: does it seem that the SfButton component does not currently have a Type property?
We have checked your reported query and button does not have Type property (both old and new version). If we set Type property to button like below, then we consider it has HTML Attributes and set to button component.
|
<SfButton Content="Add" Type="button"></SfButton> |
Query: Is using Dictionary the only solution?
We can use both solution (directly set Type property like above and using dictionary).
Please get back to us, if you need any further assistance on this.
Regards,
YuvanShankar A