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

Maxlength character restriction in Grid bound column

1 Answer 521 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gokulanathan
Top achievements
Rank 1
Gokulanathan asked on 10 Dec 2015, 03:06 PM
We have a requirement to control maximum length character restriction in Grid bound column while user entering values in field. It would be better if maximum length can be controlled without using editor template.
Please provide a sample code to achieve our requirement.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 12 Dec 2015, 07:11 AM

Hello Gokulanathan,

 

There are two possible ways of achieving the desired functionality: 

 

     1. To execute validation logic for a model field. In the Grid / Custom validator editing it is shown how to define a custom rule to check whether the product name starts with capital letter. The validation handler will be fired when the input field looses its focus. 

    2. If you want to execute your custom logic while user is typing you can use the edit event of the Kendo UI Grid. From there you can find the input element and bind to keydown or keypress events. 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Gokulanathan
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or