Collection editor validation

5 posts, 1 answers
  1. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 03 Dec 2017 Link to this post

    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.

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2791 posts

    Posted 05 Dec 2017 Link to this post

    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.
  3. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 05 Dec 2017 in reply to Dimitar Link to this post

    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.
  4. Tino
    Tino avatar
    86 posts
    Member since:
    Jul 2017

    Posted 05 Dec 2017 Link to this post

    Unfortunately there is no way to cancel the updates if validation fails.
  5. Dimitar
    Admin
    Dimitar avatar
    2791 posts

    Posted 06 Dec 2017 Link to this post

    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.
Back to Top