We have a problem with a NumericTextBox within a Grid.
We would like to automatically select the text when the control NumericTextBox take focus (or only when the input value is 0).
This is defined in a NumericTextBox EditorTemplate as follows in the attached word file. I had to attach a file because of losing text formats while copy/pasting in your rich text editor in this forum (with IE10+Office2013+Win8):
Do you have an idea to make it because we are requested to do it for an intensively used and critical application ?
DEVOTEAM Application Practice (Luxembourg)
8 Answers, 1 is accepted
Edit is an event of the Grid not of the dataSource. I.e. thy the following:
This worked great for me, but why have the setTimeout?
I would suggest vote for this functionality in the corresponding UserVoice item. Its implementation is directly related to the votes it has.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I would like to share with you that as of Kendo UI version 2020.2.617, our team has added the "SelectOnFocus" method covering the pointed requirements in this thread. For your future web development, feel free to utilize this implementation shown here:
@(Html.Kendo().NumericTextBox() .SelectOnFocus(true) .Name("numerictextbox") // The name of the NumericTextBox is mandatory. It specifies the "id" attribute of the widget. .Min(-100) // Set the min value of the NumericTextBox. .Max(100) // Set the min value of the NumericTextBox. .Value(10) // Set the value of the NumericTextBox. )
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.