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

Using Kendo UI Grid in Orchard CMS

3 Answers 166 Views
Grid
This is a migrated thread and some comments may be shown as answers.
improwise
Top achievements
Rank 1
Iron
Iron
improwise asked on 03 Nov 2015, 11:17 PM

I'm trying to use Kendo UI Grid in Orchard CMS (http://orchardproject.net) and I've almost been able to get it to work all the way but I can't seem to get validation to work. I've decorated my model with:

 

        [DisplayName("Namn")]
        [Required(ErrorMessage = "Ange värde")]
        public string Name { get; set; }

 

but when I try to update/create with empty value I get an error:

 

{"Message":"The request is invalid.","ModelState":{"civilStatusTypeViewModel.Name":["Ange värde"]}}​

 

But I am not getting any "visual validation" error message in the page.

 

It is quite complicated to setup Kendo UI with Orchard so this is most likely a configuration error, like a missing .css or .js, but I can't figure out where to look so I would be grateful for any help on how to solve this.

3 Answers, 1 is accepted

Sort by
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 03 Nov 2015, 11:47 PM
If it is any help, I notice that "data-val-required=\"Ange värde\" seem to be missing in the html/javascript generated for the module inside Orchard, but the same module in a Telerik project does generate it.
0
Alexander Popov
Telerik team
answered on 06 Nov 2015, 08:27 AM
Hi Patrik,

It seems that Orchard is preventing the rendering of the data-val attributes, although I am not sure why - similar issue has been discussed on Stack Overflow. Kendo UI relies on the data attributes and since they are not rendered there is not much we can do to help. I would suggest asking the Orchard community or support for advice.

Regards,
Alexander Popov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 06 Nov 2015, 09:53 AM
Thank you for responding to this. Indeed seems like that is the problem.
Tags
Grid
Asked by
improwise
Top achievements
Rank 1
Iron
Iron
Answers by
improwise
Top achievements
Rank 1
Iron
Iron
Alexander Popov
Telerik team
Share this question
or