title: Kendo grid Custom Commands or etc to edit table data and perform action
body: <p>I'd like to change the int status of a record and send off an email based on that change, all of which without having to redirect to a new page having the user then change the status.</p>
  
  <p>I've tried to tie in column template buttons to href's of JsonResult actions but of course that redirects.</p>
  
  <p>From the looks of it custom commands are my best bet but I'm hoping to try and utilize as much of the existing code I have which does everything but the emails as that part is easy once I have the table edits working successfully.</p>
  
  <p>Status's =
  Pending/Approve/Decline</p>
  
  <p>Pending is default thus on the grid only Approve and Decline show as options for status change.</p>
  
  <p>View code:-</p>
  
  <pre><code>{
      field: 'Application',
      template: '&lt;a style=\'width: 80px\' class=\'btn btn-success btn-block\' href=\' + sitePath + 'Placement/_Approve?Id=#=Id#\'&gt;Approve&lt;/button&gt;',
      width: 50
  },
  {
      template: '&lt;a style=\'width: 80px\' class=\'btn btn-warning btn-block\' href=\' + sitePath + 'Placement/_Decline?Id=#=Id#\'&gt;Approve&lt;/button&gt;',
      width: 50
  }
  </code></pre>
  
  <p>Controller action</p>
  
  <pre><code>[HttpPost]
      public JsonResult _Approve(int Id)
      {
          SBApplication sba = _db.SBApplications.Find(Id);
          sba.PendingApprovedDeclined = 1;
          Placement pl = _db.Placements.Find(sba.PlacementId);
          if (pl.ApprovedCount == pl.PlacementSlots)
          {
              Session.Add("redirectedapprovelimit", "yes");
              return Json(View(new { @Id = sba.PlacementId }));
          }
          int i = pl.ApprovedCount;
          i++;
          pl.ApprovedCount = i;
          if (pl.PlacementSlots == pl.ApprovedCount)
          {
              pl.OpenClosedStatus = false;
          }
          if (ModelState.IsValid)
          {
              _db.Entry(pl).State = EntityState.Modified;
              _db.Entry(sba).State = EntityState.Modified;
              _db.SaveChanges();
          //// Insert email to student stating that there application is approved
          }
          return Json(View(new { @Id = sba.PlacementId }), JsonRequestBehavior.AllowGet);
      }
  </code></pre>