update kendo grid cell value on button click

4 posts, 0 answers
  1. Shahid
    Shahid avatar
    4 posts
    Member since:
    Oct 2013

    Posted 12 Feb 2014 Link to this post

    hi i have a small issue what i am trying to do is after i populate my kendo grid, i want to update cell value on button click.

    here is the scenario: i have a grid that brings back values from database column names are integer1, integer2 etc and values are 1, 2, ...
    what i want to do is on button click(not a kendo toolbar button) change value to may be 10, 20.....dont want to save these values back to the database but just override 1, 2 with 10, 20 etc.

    thanks,
    Shahid
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 14 Feb 2014 Link to this post

    Hi Shahid,

    In case the button is on the same row as the cell that should be modified you could use the following approach:
    1. Add the custom command button and add a click event handler to it
    2. Once the event is triggered get the dataItem 
    3. Use the set method to modify the value

    Here is a small example illustrating the above, I hope it helps.

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Garry
    Garry avatar
    43 posts
    Member since:
    Sep 2012

    Posted 26 Sep 2014 in reply to Alexander Popov Link to this post

    Example jsfiddle is broken - 404 when clicking a grid button
  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 26 Sep 2014 Link to this post

    Hello Garry,

    It seems that jsBin is injecting wrong base URL. Running the example in a separate tab works as expected.

    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready