Checkbox column - Checkboxes persist checked state

2 posts, 0 answers
  1. Justin Lee
    Justin Lee avatar
    176 posts
    Member since:
    Dec 2009

    Posted 05 Mar 2019 Link to this post


    I have added a checkbox column as per the suggestion here:

    The main difference is I am not binding the checkboxes' values, and I reload the list at times.

    The issue is if I check the box in any row - for example: Row 1,  then I reload the grid (with different data) - the checkbox in row 1 will still be checked, even though the list has been reloaded ( and populated with different data.

    It is very odd behavior - is there any fix or workaround?

    I created a dojo reproducing the behavior.

    1. Check the box in Row 1  (or Row 2, it doesn't matter)

    2. Click the "Reload Grid" button to reload the list's data.

    3. Note that the checkbox is still checked.




  2. Stamo Gochev
    Stamo Gochev avatar
    218 posts

    Posted 07 Mar 2019 Link to this post


    The observed behavior is because the TreeList uses virtual dom diffing, which detects changes in attributes, but not props. This is basically a limitation of the rendering, so what I can  recommend is to manually reset the state on the "dataBound" event:

    dataBound: function(e) {
        var treelist = e.sender;
        treelist.wrapper.find("[type='checkbox']").prop("checked", false);

    Stamo Gochev
    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