使用jqgrid在标题底部添加工具栏 [英] Add toolbar in the bottom of the header using jqgrid
问题描述
我想在标题底部添加一个带有不同按钮的工具栏.有没有可能?
i want to add one more tool bar with different buttons in the bottom of the header. is there any possibilities?
已使用
toolbar: [true,"top"] or toolbar: [true,"bottom"]
显示相同的工具栏... 底部工具栏中包含添加",编辑",删除"按钮. 我想在顶部工具栏中进行更改,仅包含ADD按钮.底部工具栏包含编辑",删除",刷新"等,
its showing same toolbars... in the bottom toolbar contains Add, edit, delete buttons.. i want to make change in top toolbar contains ADD button only.. & bottom toolbar contains Edit, Delete, refresh, etc.,
谢谢
推荐答案
可能您误解了jqGrid的toolbar
参数.也许您想使用导航器,如果您使用cloneToTop: true
可以使用额外定义toppager: true
jqGrid选项.此选项在jqGrid的顶部克隆寻呼机div.之后,您可以轻松地从顶部或底部工具栏"中删除一些元素:
Probably you misunderstood toolbar
parameter of the jqGrid. Perhaps you want use Navigator having cloneToTop: true
which works if you define additionally toppager: true
jqGrid option. This option clone the pager div on the top of the jqGrid. After this one can easy remove some elements from the top or bottom "toolbar":
jQuery("#list").jqGrid({
// some parameters
toppager: true,
// some other paremeters
}).jqGrid('navGrid','#pager',{cloneToTop:true});
var topPagerDiv = $("#list_toppager")[0];
$("#edit_list_top", topPagerDiv).remove();
$("#del_list_top", topPagerDiv).remove();
$("#search_list_top", topPagerDiv).remove();
$("#refresh_list_top", topPagerDiv).remove();
$("#list_toppager_center", topPagerDiv).remove();
$(".ui-paging-info", topPagerDiv).remove();
var bottomPagerDiv = $("div#pager")[0];
$("#add_list", bottomPagerDiv).remove();
将使用与上面的代码不同的ID名称的列表"部分,因为我们将<table>
元素与id ="list"一起使用.
The part "list" of different id names from the code above will be used because we use <table>
element with id="list".
这篇关于使用jqgrid在标题底部添加工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!