最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Hide Kendo Grid toolbar using Grid ID - Stack Overflow

programmeradmin0浏览0评论

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
Add a ment  | 

2 Answers 2

Reset to default 5

Can 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();
发布评论

评论列表(0)

  1. 暂无评论