Maxlength attribute of every cell

4 posts, 1 answers
  1. Trevor
    Trevor avatar
    2 posts
    Member since:
    Mar 2018

    Posted 20 Jul 2018 Link to this post

    Is there any way to set a maxlength attribute on the input of every cell. I was hoping I could accomplish this with out using validation.

     

    Thanks!

  2. Answer
    Vessy
    Admin
    Vessy avatar
    2300 posts

    Posted 24 Jul 2018 Link to this post

    Hi Trevor,

    The content of each cell in the Spreadsheet is kept into a div element, so adding MaxLength attribute is not an option. A possible approach you can use, though, is to attach a handler to the change event of the control and check manually the length of the new value, cancelling the event should it exceed the target max length.

    For example: http://dojo.telerik.com/imIBaTIn

    You can also consider using a range validator. You can see a sample where such is used here:
    https://demos.telerik.com/kendo-ui/numerictextbox/validation

    Regards,
    Vessy
    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.
  3. Trevor
    Trevor avatar
    2 posts
    Member since:
    Mar 2018

    Posted 26 Jul 2018 in reply to Vessy Link to this post

    Awesome! Thanks for the reply!
  4. Vessy
    Admin
    Vessy avatar
    2300 posts

    Posted 30 Jul 2018 Link to this post

    Hi,

    You are welcome, Trevor :) Do let us know should any further question related to our controls occur.

    Regards,
    Vessy
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top