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

Required validation is not working on a DropDownList

5 Answers 2795 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Olivier
Top achievements
Rank 1
Olivier asked on 15 Jan 2014, 10:42 PM
Hello,

I'm using templates to display the items and the selected value on a DropDownList.

I assign the optionLabel using a string. I do it this way because I don't know the object structure upfront (it is defined at runtime).

My challenge now is that the required validation is not working on this scenario. Please take a look to this JSBin: http://jsbin.com/eLaQaFaP/2/. It reproduces the issue I'm getting on my app.

Thanks for your help.

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 16 Jan 2014, 01:21 PM
Hello Olivier,

The problem comes from the fact that in your template when you have the first optionLabel, it cannot locate the dataTextField and act accordingly. Please check the updated example here:

http://jsbin.com/UhEKocEf/1/edit

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Olivier
Top achievements
Rank 1
answered on 16 Jan 2014, 09:58 PM
Thanks Kiril! Your example helped me to fix the problem.
0
Kiril Nikolov
Telerik team
answered on 17 Jan 2014, 11:44 AM
Hello Oliever,

I am happy to hear that the example helped.

Have a great weekend!

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Grant
Top achievements
Rank 3
Iron
Iron
Iron
answered on 14 Oct 2016, 07:27 AM

Hi Kiril,

Is there a way to have the validation message appear below the dropDown instead of 'inside' the widget? View your updated jsbin example for replicate.

Thanks,
Grant

0
Kiril Nikolov
Telerik team
answered on 17 Oct 2016, 07:03 AM
Hi,

In order to control the position of the validation tooltip, you can use the following approach:

http://docs.telerik.com/kendo-ui/controls/editors/validator/overview#validator-tooltip

If this does not help - please open a separate support request with more details about your setup and we will be happy to help.

Regards,
Kiril Nikolov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
DropDownList
Asked by
Olivier
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Olivier
Top achievements
Rank 1
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or