I need to be able to run all validators when all or any inputs are change during a data grid inline edit/insert some of my validators are depend on several inputs at a time. I believe theirs away to call the validator in template forms but I have found the the same for datagrid edits.
Hi @Sir_John_Balman,
RadzenDataGrid provides the current EditContext as a cascading parameter. You can probably create a component which does that by interacting with the EditContext.
Revalidator.razor
<RadzenButton Text="Validate" Click=@OnValidateClick />
@code {
[CascadingParameter]
public EditContext EditContext { get; set; }
void OnValidateClick()
{
EditContext.Validate():
}
}
PageWithGrid.razor
<RadzenDataGridColumn TItem="MyItem">
<EditTemplate>
<Revalidator />
</EditTemplate>
</RadzenDataGridColumn>
1 Like
thanks for replying I ended up, just filter the drop down data list based on current saved data. so that the user was unable to select multiple for a given Type. Again thanks!!