Using Kendo UI Grid in Orchard CMS

4 posts, 0 answers
  1. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 03 Nov 2015 Link to this post

    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.

  2. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 03 Nov 2015 in reply to Patrik Johansson Link to this post

    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.
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 06 Nov 2015 Link to this post

    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
  5. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 06 Nov 2015 in reply to Alexander Popov Link to this post

    Thank you for responding to this. Indeed seems like that is the problem.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready