Custome command in kendo UI Grid toolbar


   toolbar: [  
           {  
             name: "Add",  
             text: "Make Passive 3 Times Unsuccesful Ones",  
             click: function (e) { console.log("foo"); return false; }  
            }  
         ],  

in the grid script

   $(".k-grid-Add", "#DefaultGrid").bind("click", function (ev) {  
                    $.ajax({  
                      type: "POST",  
                      url: "http://localhost/Notifier/Devices/MakePassive/model",  
                      contentType: "application/json; charset=utf-8",  
                      dataType: "json",  
                      async: false,  
                      success: function (data) {  
                        //ev.success();  
                        if (data.ResponseCode == 800) {  
                          ev.success();  
                        } else {  
                          alert(data.ResponseMessage);  
                        }  
                      }  
                    });  
                    mAKendoGridRefresh();  
                  });  


Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report