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

URGENT - Grid - Custom Validator not working after setOptions

3 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Salim
Top achievements
Rank 1
Salim asked on 08 Dec 2017, 04:08 PM

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

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Dec 2017, 06:36 AM
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.
0
Salim
Top achievements
Rank 1
answered on 14 Dec 2017, 08:08 AM

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.

0
Stefan
Telerik team
answered on 15 Dec 2017, 09:14 AM
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.
Tags
Grid
Asked by
Salim
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Salim
Top achievements
Rank 1
Share this question
or