Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150751 | Jan 18,2020 12:00 AM UTC | Jan 20,2020 02:07 PM UTC | Blazor | 1 |
![]() |
Tags: Grid |
//Grid definition contains: <GridEvents OnActionBegin="OnActionBegin" TValue="MyClass"></GridEvents><EjsDataManager AdaptorInstance="@typeof(MyCustomAdaptor)"
Adaptor="Adaptors.CustomAdaptor">
</EjsDataManager>
<GridEditSettings AllowAdding="true"
AllowDeleting="true"
AllowEditing="true"
Mode="@EditMode.Dialog">
<Template>
@{
var myObj = (context as MyClass);
<MyEditor MyFiled="@myObj" MyDialogMessageProvider="@_myDialogMessageProvider"/>
}
</Template>
</GridEditSettings>
//code of OnActionBegin:public void OnActionBegin(ActionEventArgs<MyClass> args)
{
if (args.Action == "add")
{
//args.Data validations here
{
//prevent close dialog and show message code here
args.Cancel = true;
}
}
}
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.