Checking to see if a radgrid field is full

2 posts, 0 answers
  1. Neil
    Neil avatar
    3 posts
    Member since:
    Mar 2019

    Posted 22 Mar Link to this post

    Hi,

       New to Telerik. I've figured some stuff out but have hit a problem that I can't figure out. We have some scanning equipment that fills fields in rad grid with a template and some masked fields. I want to know if, on a change to the text in the field, if the field is completely filled. If so I want to move to the next field automatically. I tried the text change event but, to my surprise it didn't fire until after I saved the added line in the grid. I was able to find the max length of the field using the mask property of the masked field I'm using but I really want to make this check before the line is saved. I have researched this but can't seem to find a solution. Any help would be appreciated.

     

    Thanks,

    Neil

  2. Vessy
    Admin
    Vessy avatar
    2068 posts

    Posted 27 Mar Link to this post

    Hi Neil,

    Indeed the text change is triggered too late (when the input is blurred) but you can use the key press event in order to achieve your goals.  The Grid has four Edit modes, so if you are not using Batch editing, you can directly focus the next input once the value of the current one is filled (check that in the input's key press event). Please note, that you may need to wrap the logic inside this event handler with a little setTimeout() in order to ensure that the last pressed key value is applied.

    In case you are using Batch editing, you can go to the next cell you want to edit when the value of the currently edited one is filled, by using the openCellForEdit() method:
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/client-side-api

    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