Tuesday, April 7, 2015

kendo ui grid hide toolbar button


If you want to hide or show any toolbar button (Add, Edit & delete) of kendo UI grid you can use this script .


  $(document).ready(function () {  
                // Your Grid   
               // menu enable & disable  
               var MenuEdit = '@ViewData["MenuEdit"].ToString()';  
               alert(MenuEdit);  
               if (MenuEdit == 0) {  
                 $(".k-grid-add", "#DefaultGrid").hide();  
                 $(".k-grid-edit", "#DefaultGrid").hide();  
                 $(".k-grid-delete", "#DefaultGrid").hide();  
               }  
               else {  
                 $(".k-grid-add", "#DefaultGrid").show();  
                 $(".k-grid-edit", "#DefaultGrid").show();  
                 $(".k-grid-delete", "#DefaultGrid").show();  
               }  
             });  

Note: Define the script after your Kendo UI Grid.

Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file

In my Xamarin form application their was dependency Restclient on Microsoft.Bcl.Build Microsoft.Bcl. i just remove all using nuget and ...