3
votes

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();
2

2 Answers

5
votes

Can you just add the id of the grid you want to target in your jQuery selector?

$("#GridID .k-grid-toolbar").hide();

2
votes

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();