Hi Fernando,
We have validated your reported
query and can achieve your requirement by using the Toggle method of the
dropdown menu. Please refer the code snippet and API link.
API link:
https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SplitButtons.SfDropDownButton.html#Syncfusion_Blazor_SplitButtons_SfDropDownButton_Toggle
|
@using Syncfusion.Blazor.SplitButtons
@using Syncfusion.Blazor.Buttons
<SfDropDownButton @ref="dropdownbtn" Content="Edit">
<DropDownMenuItems>
<DropDownMenuItem Text="Cut"></DropDownMenuItem>
<DropDownMenuItem Text="Copy"></DropDownMenuItem>
<DropDownMenuItem Text="Paste"></DropDownMenuItem>
</DropDownMenuItems>
</SfDropDownButton>
<SfButton CssClass="e-primary" @onclick="OnOpen">Open</SfButton>
@code{
private SfDropDownButton dropdownbtn;
private void OnOpen()
{
dropdownbtn.Toggle();
}
}
|
Could you please check
the above code and get back to us, if you need any further assistance on
this.
Regards,
YuvanShankar A