Hi Barry,
Greetings from Syncfusion.
We suspect that you have implemented the Custom Validator
component on your own like this documentation.
You want to know whether the particular action is Add or Edit. If yes, then we
suggest you to find the corresponding action that is added/edited by using the OnActionBegin event. Find the below code snippets for your reference.
Reference:
https://blazor.syncfusion.com/documentation/datagrid/events#onactionbegin
|
<SfGrid DataSource="EmployeeList" AllowPaging="true" Toolbar="toolbar">
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true"></GridEditSettings>
<GridEvents OnActionBegin="ActionBeginHandler" TValue="EmployeeDetails"></GridEvents>
<GridColumns>
. .
</GridColumns>
</SfGrid>
@code
{
. ..
string EditType { get; set; }
public void
ActionBeginHandler(ActionEventArgs<EmployeeDetails> args)
{
if
(args.RequestType.Equals(Syncfusion.Blazor.Grids.Action.Add))
{
EditType
= "Add";
} else if
(args.RequestType.Equals(Syncfusion.Blazor.Grids.Action.BeginEdit))
{
EditType = "Edit";
}
}
. . .
}
|
If it is not your requirement or if we misunderstood your
requirement, then could you please share more details about your requirement.
Regards,
Rahul