This is a migrated thread and some comments may be shown as answers.

New custom grid column type - GridValidationColumn

5 Answers 401 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vasile
Top achievements
Rank 1
Vasile asked on 28 Mar 2021, 08:10 AM
Is it possible to create a custom column type (eg GridValidationColumn) for TelerikGrid?

I found the following example to validate a TelerikGrid cell (EditMode = GridEditMode.Incell).
https://feedback.telerik.com/blazor/1447439-is-there-a-way-to-implement-custom-validation-in-a-blazor-telerik-grid-when-pressing-save-update-command- button-if-not-is-there-plans-on-providing-custom-validation-as-a-feature-in-the-near-future
Starting from this example, in order not to repeat the validation code for each column, GridValidationColumn will need to have a default EditorTemplate that contains all the logic in the example. With the option to customize only the cell editor.

5 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 29 Mar 2021, 06:18 AM

Hi Vasile,

With this enhancement, the grid will support data annotation validation in the InCell and Inline edit modes, just like it does for the Popup mode. The feature will be live in our next 2.23.0 release that should be live within a week.

So, I'd encourage you to wait for the 2.23.0 release a little and try it out.

For more detailed customizations, you would still use the editor template, the added benefit is that now you would have an EditContext as a cascading parameter.

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Vasile
Top achievements
Rank 1
answered on 29 Mar 2021, 06:30 AM

Hi Marin,

You give me great news.

 

Vasile Lacatus

Advanced Software Solutions

0
Vasile
Top achievements
Rank 1
answered on 01 Apr 2021, 11:54 AM

Grid Incell edit validation also works with FluentValidation.

 

Vasile Lacatus

Advanced Software Solutions

0
Vasile
Top achievements
Rank 1
answered on 01 Apr 2021, 03:43 PM
Sorry, it was a mistake on my part in the previous post. It does not work with Fluent Validation.
0
Accepted
Marin Bratanov
Telerik team
answered on 01 Apr 2021, 04:00 PM

Hello,

I am afraid that such a built-in integration is not possible because it would mean us bringing in a third party dependency to all our customers.

You can, however, build a custom edit form (examples here and here) that can integrate with any validator you want. For example, our Form component can take any validator that is compatible with the standard EditContext.

 

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Vasile
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Vasile
Top achievements
Rank 1
Share this question
or