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

CurrencyTextBoxFor Read only issue

3 Answers 1674 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
PAUL
Top achievements
Rank 1
PAUL asked on 29 Aug 2012, 11:00 AM
Seems so simple. Would like to find a quick solution but never can. I have a autocomplete set to read only... no problem.

@Html.Kendo().AutoCompleteFor(model => model.CID).Name("CID").HtmlAttributes(new { @readonly = "readonly" })

Now I want to make CurrencyTextBoxFor read only. PROBLEM. Why is every widget different on basic attributes? Here is the code:

@Html.Kendo().CurrencyTextBoxFor(model => model.BudgetSpent).Name("BudgetSpent").HtmlAttributes(new { @readonly = "readonly" })

It doesn't work. Can't find it in documentation and have to move on to the next Kendo problem for MVC

Please help or point me to where I can find a solution to basic features like this.

Thanks

3 Answers, 1 is accepted

Sort by
0
PAUL
Top achievements
Rank 1
answered on 29 Aug 2012, 06:03 PM
and after further investigation

@Html.Kendo().CurrencyTextBoxFor(model => model.AvailableBudget).Name(

 

"AvailableBudget").Spinners(false).HtmlAttributes(new { @readonly = "readonly" })


The text box itself is set to read only but the widget overlay is a separate issue...

 

0
Georgi Krustev
Telerik team
answered on 30 Aug 2012, 04:03 PM
Hello PAUL,

 
Could you please elaborate more on the "but the widget overlay is a separate issue...". What is the required behavior? After you make the input readonly, it can be focused, but not modified.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
PAUL
Top achievements
Rank 1
answered on 30 Aug 2012, 04:23 PM
The required behavior is for the display to be read only. The problem is that there is a spinner on the number textboxes (which is a separate object) that can increment the display. So even though you could not type into the text box you could still click the up or down arrow and that would change the value in the textbox....therefore not read only.

The default value for the Spinners is true so setting it to false removed them and problem solved...

Sorry new to Kendo and just trying to get around...

Thanks

Tags
General Discussions
Asked by
PAUL
Top achievements
Rank 1
Answers by
PAUL
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or