title: How to Delete Multiple rows by selecting checkBox using MVC 4 Webgrid wihtout Using Begin form
body: <blockquote>
    <blockquote>
      <p><strong>Hi I am Currently Working On MVC Razor. here is the scenario. can
      anyone have a solution?</strong>
          How to Delete Multiple rows by selecting checkBox using MVC 4 Webgrid wihtout Using Begin form</p>
      
      <p>Index.cshtml
          
            
                          Add
                          Edit</p>
  
  <pre><code>//Here if i click on Delete Link i need to get Selected rows from WEbgrid ? and should delete 
                    &lt;th&gt;&lt;a href="#" title="Delete" id="DeleteSelectedChkbx" &gt;Delete&lt;/a&gt;&lt;/th&gt; 
  
              &lt;/tr&gt;
  &lt;/div&gt;
  </code></pre>
    </blockquote>
  
  <pre><code> @using (@Html.BeginForm("Index", "Users", FormMethod.Post)) {
  @(Html.Kendo().Grid(Model.user)
  .Name("GroupsGrid")
   //.Events(events =&gt; events.Change("onChangenow").DataBound("onDataBound").DataBinding("onDataBinding"))
  .Columns(columns =&gt;
  {
      columns.Template(@&lt;text&gt;&lt;/text&gt;).ClientTemplate("&lt;input type='checkbox' id='#= ID#,#= Name#' class='grid_checkbox'/&gt;")
      .HeaderTemplate("&lt;input type='checkbox' id='selectall'/&gt;").Width(50);
      columns.Bound(p =&gt; p.ID).Hidden(true);
      columns.Bound(p =&gt; p.Name).Title("Name");
  })
  //.Selectable(selectable =&gt; selectable.Mode(GridSelectionMode.Multiple))
  //.Navigatable()
  .Sortable()
  .Scrollable(src =&gt; src.Height("650px"))
  .DataSource(dataSource =&gt; dataSource
      .Ajax()
      .PageSize(20)
      //.Read(read =&gt; read.Action("Jobs_Read", "Jobs").Data("JobsReadData"))
      )
  .Resizable(resize =&gt; resize.Columns(true))
  
  )        }  
  </code></pre>
    
    <p>
            $(function () {
                // add multiple select / deselect functionality
                $("#selectall").click(function () {
                    var checkAll = $("#selectall").prop('checked');
                    if (checkAll) {
                        $(".grid_checkbox").prop("checked", true);
                    } else {
                        $(".grid_checkbox").prop("checked", false);
                    }
                });</p>
  
  <pre><code>        // if all checkbox are selected, check the selectall checkbox and vice versa
          $(".grid_checkbox").click(function () {
              if ($(".grid_checkbox").length == $(".grid_checkbox:checked").length) {
                  $("#selectall").prop("checked", true);
              } else {
                  $("#selectall").prop("checked", false);
              }
          });
      });    
  &lt;/script&gt;
  </code></pre>
  </blockquote>