URGENT - Grid - Custom Validator not working after setOptions

4 posts, 0 answers
  1. Salim
    Salim avatar
    102 posts
    Member since:
    Jun 2016

    Posted 08 Dec 2017 Link to this post

    Please help since we have no longer confidence in kendo and we might use another library of components. 

    The custom validation on a numeric field is not working after using setOptions. In the setOptions we are adding new numeric fields with custom validation between 0 and 100.

    The below is a sample that I tried to implement to show our case:

    https://dojo.telerik.com/egawE

     

    Thank you in advance

  2. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 12 Dec 2017 Link to this post

    Hello, Salim,

    I'm sorry to hear that you no longer have confidence in our products. I hope we can prove that our components and the support can meet up your requirements.

    As for the provided example, the issue occurs because the schema is part of the Grid dataSource and the dataSource should be part of the setOptions object. Once I added the schema configuration inside a dataSource property, the validation was working as expected. Please have in mind that when setting a nested properties, the full path has to be set inside the setOptions method.

    Please check the modified example:

    https://dojo.telerik.com/egawE/2

    I hope this is helpful.

    Regards,
    Stefan
    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. Salim
    Salim avatar
    102 posts
    Member since:
    Jun 2016

    Posted 14 Dec 2017 in reply to Stefan Link to this post

    Hi Stefan,

    Thanks for your reply, but in my real code, I am already building all the options properly even the schema configuration is inside the dataSource property, and then I am calling setOptions, and it is not working. The weird thing is that I am not able to reproduce it in the above sample.

  4. Stefan
    Admin
    Stefan avatar
    2491 posts

    Posted 15 Dec 2017 Link to this post

    Hello, Salim,

    Please have in mind that the dataSource configuration has to be part of the object passed to the setOption methods. Even if the dataSource is set correctly initially, its full path has to be used inside the method.

    Also, if only the dataSource options will be modified, I can suggest making a new dataSource with the desired options and passing that dataSource using the setDataSource method:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-setDataSource

    If additional assistance is needed, please provide an example where the issue is reproducible and it is closest to the real application.

    Regards,
    Stefan
    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