I am having Kendo Razor Grid in which I am having a Toolbar with Create button. I am having 2 different kendo grids in same page. I want to Hide only one of the Grid's Toolbar. How can I do this ?
We can hide Toolbar using the below code. As it points to class, toolbar on both grids will hide. I want only one of them to hide. How can I do this ?
$(".k-grid-toolbar").hide();
I am having Kendo Razor Grid in which I am having a Toolbar with Create button. I am having 2 different kendo grids in same page. I want to Hide only one of the Grid's Toolbar. How can I do this ?
We can hide Toolbar using the below code. As it points to class, toolbar on both grids will hide. I want only one of them to hide. How can I do this ?
$(".k-grid-toolbar").hide();
Share
Improve this question
asked Mar 17, 2015 at 22:52
ChatraChatra
3,1397 gold badges43 silver badges75 bronze badges
2 Answers
Reset to default 5Can you just add the id
of the grid you want to target in your jQuery selector?
$("#GridID .k-grid-toolbar").hide();
Try to add unique id attribute for each toolbar.
such as the first Grid's Toolbar's id as myid1
, the second Grid's Toolbar's id as myid2 . Let's hiding the frist Grid's Toolbar, something like this,
$(".k-grid-toolbar#myid1").hide();