<EjsButton @onclick="@OnBtnClick">Open Dialog</EjsButton>
<EjsDialog @ref="DialogObj" Width="250px" ShowCloseIcon="true" IsModal="true">
<DialogTemplates>
<Header> Dialog</Header>
<Content> This is a Dialog with button and primary button</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton ButtonModel="@OkBtn" OnClick="@OnClick" />
<DialogButton ButtonModel="@CancelBtn" OnClick="@OnClick" />
</DialogButtons>
</EjsDialog>
@code {
EjsDialog DialogObj;
private void OnClick(Object args)
{
this.DialogObj.Hide();
}
private void OnBtnClick()
{
this.DialogObj.Show();
}
public Syncfusion.EJ2.Blazor.Buttons.ButtonModel OkBtn = new Syncfusion.EJ2.Blazor.Buttons.ButtonModel { Content = "OK", IsPrimary = true };
public Syncfusion.EJ2.Blazor.Buttons.ButtonModel CancelBtn = new Syncfusion.EJ2.Blazor.Buttons.ButtonModel { Content = "Cancel" };
}