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

inline edit for numeric field -> select text on focus

2 Answers 409 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
Aleksandr asked on 01 Feb 2021, 10:52 AM
any possible way we can have it?

2 Answers, 1 is accepted

Sort by
0
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
answered on 01 Feb 2021, 11:19 AM

workaround:

 

function numericEditor(container, options) {
                   $('<input required name="' + options.field + '"/>')
                       .appendTo(container)
                       .kendoNumericTextBox({
                           value: options.model.Number,
                           format: options.format,
                           selectOnFocus: true
                       });
               }
 
               return $("#grid")
                   .kendoGrid({
                       columns: [
                           { field: "Year", title: "Year", width: "250px", format: "{0:#0}" },
                           { field: "EmployeeType.Description", title: "Employee Type", width: "250px", editor: employeeTypeListBuilder.SingleSelectEditor, filterable: employeeTypeListFilter },
                           { field: "Number", title: "Number", width: "250px", format: "{0:#,##0}", editor: numericEditor },
                           { field: "Description", title: "Description", width: "1051px" },
                           { command: ["edit", /*"destroy"*/ KendoGridCustomDestroyButtonBuilder.Build()], title: "Action", width: "90px" }
                       ],

 

but it would be great to have such option as a column property

0
Anton Mironov
Telerik team
answered on 03 Feb 2021, 09:28 AM

Hi Aleksandr,

Thank you for providing the approach for setting the "selectOnFocus" property.

On your behalf I am sharing the complete implementation with the community:

In order to ask adding this functionality as a column property, I would recommend creating a feature request in our feedback portal:

If anything else is needed, do not hesitate to contact me and the team.


Kind Regards,
Anton Mironov
Progress Telerik

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/.

Tags
Grid
Asked by
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
Answers by
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
Anton Mironov
Telerik team
Share this question
or