Disable validation DropDownListFor when no items

2 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    3 posts
    Member since:
    Sep 2010

    Posted 14 Jun 2013 Link to this post


    I have 9 DropDownListFor that cascades from other DropDownList. I need to disable validation for DropDownLists that has no items. How to do it ?
  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 18 Jun 2013 Link to this post

    Hello Sebastian,

    Kendo Validator works on the basis of HTML validation attributes. In order to disable/remove a given validation rule, you can remove the corresponding attribute from DropDownList element.

    Please hook up to the dataBound event of the widget and remove the validation attributes if there is no data in the dataSource. For example:
    onDataBound: function(e) {
        if(this.dataSource.data().length == 0) {

    I hope this will help.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top