2
votes

I'm using kendo ui dropdownlist component (not the wrapper) in my Asp.net mvc 4 project. We are not using kendo ui validator.

I want to use html5 required attribute for this field. But when I set required attribute, when no value is selected, it does not give any message, also does not submit. But when I use simple (select tag):

<select required="required">
  <option></option>
  ...
</select>

It works; When I not select a value, it does not submit and gives an error message (html5 required attribute).

Is it possible that for kendo ui dropdownlist behaves exactly like normal html select component.

1
I don't think it is possible. Kendo UI dropdown is not a <select> list is a text box that is visible along with other elements that makes it look like a dropdown. - user3731783
Sorry for the type in my previous comment.. I am too hurry.. they are all span tags and not text boxes. - user3731783

1 Answers

0
votes

Yes it is possible.

You can add a select event to the kendo dropdown and check if any value is selected or not. If no value is selected you can raise a warning before submitting the form.