title: kendoui grid select all
body: <p>I, working with MVC + kendoui grid and this is my code:</p>
  
  <hr>
  
  <p>model</p>
  
  <hr>
  
  <pre><code>      public class User
           {
          [StringLength(9)]       
          public int UserId { get; set; }
  
          [StringLength(50)]        
          public string UserName { get; set; }
  
          public bool IsSelected { get; set; }
  }
  </code></pre>
  
  <p>cshtml</p>
  
  <pre><code>@model IEnumerable&lt;PoliciesHaglasha.Models.User&gt;
  
  @{    
      Layout = null;
      var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
      var users = MvcHtmlString.Create(serializer.Serialize(Model));
  }
  
           JsonUsers = @users;
  
          var  UsersSource = new kendo.data.DataSource({
              pageSize: 5,
              data: JsonUsers,            
              autoSync: true,
              schema: {
                  model: {
                      id: "UserId",
                      fields: {
                          UserId: { type: "number" ,editable: false, nullable: false },                      
                          UserName: { type: "string" , editable: false, nullable: false }                     
                      }
                  }
              }
          });     
             $("#gridPolisot").kendoGrid({
              dataSource: PolisotSource,                        
              editable: true,
              scrollable: false,
              selectable: "row",
              sortable: true,            
              reorderable: true,           
              toolbar: [{ name: "save", text: "save" }],
              columns: [ 
                      { field:"IsSelected", title: "&lt;input type='checkbox' id='chkSelectAll'&gt;", width: "34px" ,template: "&lt;input  type='checkbox' #= IsSelected ? checked='checked' : '' #/&gt;"},                                    
                      { field:"UserId", title: "User Id", width: "20px", attributes: {"class": "KendoUITD"}},
                      { field:"UserName",title:"User Name",  width: "50px", attributes: {"class": "KendoUITD"}},              
                  ],         
              },                         
          });
  </code></pre>
  
  <p>My questions are:</p>
  
  <p>1)   How do I make the select all title checkbox to work?</p>
  
  <p>2)  When I check/uncheck a checkbox it will return to the server</p>
  
  <p>Thanks,</p>