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

Collection editor validation

4 Answers 134 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Tino
Top achievements
Rank 1
Tino asked on 04 Dec 2017, 04:04 AM

How do we validate from the collection editor? In my case, a collection property that pops up a collection editor. If I change an item's property values, my Validating/End-editing handlers do not get called.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 05 Dec 2017, 09:06 AM
Hello Tino,

We are using the standard UITypeEditor and it does not have a validation events. In this case, you can use the Edited event, iterate the collection and check if all values are valid.

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Tino
Top achievements
Rank 1
answered on 05 Dec 2017, 08:58 PM
Thanks, I can do it that way. And yes I noticed after I posted that I am in fact getting an Edited event on my Collection property, so I'll just validate the entire collection.
0
Tino
Top achievements
Rank 1
answered on 06 Dec 2017, 04:32 AM
Unfortunately there is no way to cancel the updates if validation fails.
0
Dimitar
Telerik team
answered on 06 Dec 2017, 10:53 AM
Hello Tino,

If this is necessary you can create a small form that allows you to edit such collections and use it as a custom editor. This way you will be able to validate the input in it.

Do not hesitate to contact us if you have other questions. 

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PropertyGrid
Asked by
Tino
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Tino
Top achievements
Rank 1
Share this question
or