DataGrid InLine Edit support Validations

Hi good people,

As I read here, datagrid Inline Edit support validation, yes. But these validations, are fired only if the datagrid´s row is editted.

In my form, I had a RadzenTemplateForm, and when the data is loaded from the DB, all validations are fired, but the ones inside the datagrid are not fired, only when the row is editted.

How can I make all validation, including the ones inside the inLine edits to be fired when the data is loaded?

Thanks in advance.

Hi @iguron,

No, this is not possible. Every DataGrid row acts as a separate form so it has its own validation. The whole datagrid itself won't validate as part of a form.

Ok, what about forcing a validation of each row by code? Could it be possible? How could it be done?

The best approach I could think of, is to force validations of each row, and if one validation fails, fire the editing of this row (not sure how to do this last step -fire the editing of one line by code--), in order to show the real error. Of course as soon as one validation fails the rest of validations would not be done.

Maybe my answer is not clear. I will try to explain myself.

As you said forcing validations on a DataGrid is not possible. But I can make my own validations by code, row by row. And If I find an error, I would like to force the editing of this row by code. How can I make this "force the editing of an specific row"?

Thanks in advance.

The EditRow method puts a record in edit mode:

await ordersGrid.EditRow(order);

Fantastic, this could solve the problem. I can make the validations by code and edit the wrong row.