Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add toolbar in the bottom of the header using jqgrid

Tags:

jqgrid

i want to add one more tool bar with different buttons in the bottom of the header. is there any possibilities?

used

 toolbar: [true,"top"] or toolbar: [true,"bottom"] 

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.,

Thank you,

like image 896
jerry Avatar asked Aug 24 '10 01:08

jerry


1 Answers

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

The part "list" of different id names from the code above will be used because we use <table> element with id="list".

like image 94
Oleg Avatar answered Sep 28 '22 07:09

Oleg