Hi Andrew,
For attaching the handler to the focus event you will have to place the JavaScript code within the editor template itself:
Hope this helps.
Regards,
Konstantin Dikov
Telerik by Progress
For attaching the handler to the focus event you will have to place the JavaScript code within the editor template itself:
@model decimal?
@(Html.Kendo().NumericTextBoxFor(m => m)
.HtmlAttributes(new { style = "width:100%" })
.Spinners(false)
.Decimals(2)
)
<
script
>
$(function () {
$("input[type=text]").bind("focus", function () {
var input = $(this);
clearTimeout(input.data("selectTimeId")); //stop started time out if any
var selectTimeId = setTimeout(function () {
input.select();
});
input.data("selectTimeId", selectTimeId);
}).blur(function (e) {
clearTimeout($(this).data("selectTimeId")); //stop started timeout
});
})
</
script
>
Hope this helps.
Regards,
Konstantin Dikov
Telerik by Progress
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 Feedback Portal
and vote to affect the priority of the items