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

kendoGrid on-fly pattern check during edit & expanding abbreviation.

2 Answers 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RK
Top achievements
Rank 1
RK asked on 01 Jun 2018, 06:47 PM

Hi , i am new to KendoGrid and have few questions . could you please provide your valuable input on this as i am not able to find the correct solution for below.

 

#1 - I am aware of custom validation , but is it possible to attach on-fly pattern check while editing  the cell value , if the value doesn't match with pattern the value should be discarded automatically  similar to inbuilt numeric check when we define type=numeric and try to provide character. 

#2 - i need some conversion while editing , such as lowercase to uppercase OR expand abbreviation such as 1k to 1000 ( k stand for 1000) . where i need to place this logic . Editor or Edit event ?

 

 

2 Answers, 1 is accepted

Sort by
0
RK
Top achievements
Rank 1
answered on 05 Jun 2018, 01:21 PM

Hi Guys , could you please provide an update on this whenever you get time. i am not getting enough information for same on your documentations.

Also how can i bind input field class, for example i have a custom class alpha-numeric class which will discard wrong key press , i tried columns.attributes  but seems this will work only with css class.

attributes:{"class": "alpha-numeric"}

0
Eyup
Telerik team
answered on 05 Jun 2018, 05:06 PM
Hi,

Yes, the Kendo Grid component provides built-in validation for its fields:
https://demos.telerik.com/kendo-ui/grid/editing-inline

For custom validation you can check this live sample:
https://demos.telerik.com/kendo-ui/grid/editing-custom-validation

If you want to prevent characters for numeric fields, you can use the NumericTextBox, which provides this automatically. Additionally, I've modified one of the samples above to demonstrate how you can use the edit event handler to access and modify the generated elements as you've requested:
https://dojo.telerik.com/ojeZiJIB/2

The ProductName text is uppercase in edit mode and the value of UnitPrice is multiplied by 1000.

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
RK
Top achievements
Rank 1
Answers by
RK
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or