Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:40:50+00:00 2026-06-17T21:40:50+00:00

I have a checkbox for each row within a kendo grid. If the user

  • 0

I have a checkbox for each row within a kendo grid. If the user sorts or filters the grid, the checkmarks are cleared from the checkboxes. How can I prevent the checkboxes from unchecking or re-check them after the sort or filter occurs? Please refer to the following js fiddle to observe the behavior during sorting:

http://jsfiddle.net/e6shF/33/

Here’s the code on the jsfiddle for reference (…needed to ask this question):

$('#grid').kendoGrid({
    dataSource: { data: [{id:3, test:'row check box will unchecked upon sorting'}]},
    sortable: true,
    columns:[
{
    field:'<input id="masterCheck" class="check" type="checkbox" /><label for="masterCheck"></label>', 
    template: '<input id="${id}" type="checkbox" />',
    filterable: false,
    width: 33,
    sortable: false // may want to make this sortable later. will need to build a custom sorter.
},
    {field: 'test',
     sortable: true}
]});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:40:52+00:00Added an answer on June 17, 2026 at 9:40 pm

    basically the selection is cleared each time because the Grid is redrawn. You can store the check items in an array or object and when the Grid is redrawn (dataBound event) you can mark them again as checked.

    To simplify things here is an updated version of you code. Also use the headerTemplate option to set header template – do not name your field like template instead.

    var array = {};
    $('#grid').kendoGrid({
        dataSource: { data: [{id:3, test:'row check box will unchecked upon sorting'}]},
        sortable: true,
        dataBound:function(){
            for(f in array){
                if(array[f]){
                    $('#'+f).attr('checked','checked');
                }
            }
        },
        columns:[
        {
            headerTemplate:'<input id="masterCheck" class="check" type="checkbox" /><label for="masterCheck"></label>', 
            template: '<input id="${id}" type="checkbox" />',
            filterable: false,
            width: 33,
            sortable: false // may want to make this sortable later. will need to build a custom sorter.
        },
            {field: 'test',
             sortable: true}
        ]});
    
    var grid = $('#grid').data().kendoGrid;
    $('#grid tbody').on('click',':checkbox',function(){   
        var id = grid.dataItem($(this).closest('tr')).id;
        if($(this).is(':checked')){        
            array[id] = true;
        }else{
            array[id] = false;
        }
    })
    

    Link to the fiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I have a list view within it each row has a checkbox attached.
I have a table with checkbox and a dropdown in each row. I'd like
I'm trying to setup custom validation for a checkbox. I have 7 checkboxes each
I have listview with 2 textbox and 1 checkbox on each row. I want
i have a CellTable in my GWT Projekt with a CheckBox in each row.
I have a large data table that contains a checkbox for each row. I
I have a small html form with three checkboxes, one in each row .
In an ASP:ListView control, I have a checkbox for each row. Each row represents
I have painted a checkbox against each row in my datatable using the following
I have a table with a checkbox in each row. I want to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.