title: Row selection and deselection in kendo grid using checkbox
body: <p>I am using kendo grid and check box in the grid.I have an option to check all the rows using checkbox and uncheck them too.Its working perfectly.Now when i check a individual row the row is getting selected.But when i uncheck the row its not clearing the selection.I am using the following code.</p>
  
  <pre><code>$("#refegrid").kendoGrid({
              dataSource: griddataSource,
              pageable: true,
              selectable: "multiple",
              sortable: true,
              filterable: false,
              reorderable: true,
              scrollable: false,
              columns: [
                  {
                      field:"check_item",title:"&lt;input type='checkbox' id='chkSelectAll' onchange='SelectAll();'/&gt;",template:"&lt;input type='checkbox' id='inpchk' onchange='chkOrUnchk()'/&gt;",width:'50px',sortable:false
                  }
              ],
              editable: "inline",
          });
  
  function chkOrUnchk(){
          $('tr.k-state-selected','#refegrid').removeClass('k-state-selected');
      }
  </code></pre>
  
  <p>//Function for selecting/deselecting all records</p>
  
  <pre><code>function SelectAll(){
          if ($("#chkSelectAll").attr('checked')) { 
              $("#refegrid").each(function () {
                  var $row    = $(this);
                  var checked = $row.find('#inpchk').attr('checked');
                  $row.find("#inpchk").attr('checked', 'checked');
                  //$(this).addClass('k-state-selected');
              }); 
          }
          else {                   
              $("#refegrid").each(function () {
                  var $row = $(this);
                  $row.find("#inpchk").removeAttr('checked');
                  //$(this).removeClass('k-state-selected');
              }); 
          }           
      }
  </code></pre>
  
  <p>The commented statements are used for selecting/deselecting all records</p>
  
  <p>I have tried <code>removeClass()</code> ethod to clear the selection.But its not working.How to solve the issue.?Any help is much appreciated.?</p>