I tried the following, but the maxLength attribute doesn't get set on the text input element: .HtmlAttributes(new { maxLength = "80" })
Is this a bug? Or is there some other way of setting the maximum text length on the ComboBox?
3 Answers, 1 is accepted
0
Georgi Krustev
Telerik team
answered on 27 Jun 2011, 07:51 AM
Hello Craig,
In order to achieve your goal, you will need to use InputHtmlAttributes instead of HtmlAttributes. HtmlAttributes will append attributes to the DIV wrapper instead of the input element.
Regards,
Georgi Krustev
the Telerik team
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 Public Issue Tracking
system and vote to affect the priority of the items
That method doesn't exist on the ComboBoxBuilder in the Q1 2011 release.
0
Georgi Krustev
Telerik team
answered on 28 Jun 2011, 09:48 AM
Hello Craig,
InputHtmlAttributes method was introduced in the SP1 of Q1 2011 release of the Telerik extensions for ASP.NET MVC, which is available only for customers.
As a workaround you can use client OnLoad event and set the maxLength attribute to the visible input element. Check this code snippet:
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 Public Issue Tracking
system and vote to affect the priority of the items