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

3 posts, 0 answers
  1. RK
    RK avatar
    5 posts
    Member since:
    May 2018

    Posted 01 Jun 2018 Link to this post

    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. RK
    RK avatar
    5 posts
    Member since:
    May 2018

    Posted 05 Jun 2018 Link to this post

    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"}

  3. Eyup
    Admin
    Eyup avatar
    4046 posts

    Posted 05 Jun 2018 Link to this post

    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.
Back to Top