tags:

views:

48

answers:

1

Trying to Replicate the action buttons that are present in the bottom toolbar on the top toolbar.

But so far no luck, have included the truncated code below

Paging is not an option in this case so the user requires both top and bottom toolbars

jQuery("#GridName").jqGrid({
    url: '<%= ResolveUrl("~") %>SomeController/SomeMethod ....',
    datatype: 'json',
    colNames: ['Column1', 'Column2',  'Details', 'Date'],
    colModel: [
        //......
    ],
    pager: '#GridNamePager',
    viewrecords: true,
    emptyrecords: "Nothing to display",
    shrinkToFit: true,
    hidegrid: false,
    scroll: false,
    width: 976,
    height: 'auto',
    loadui: 'enable',
    pgtext: '',
    pgbuttons: false,
    pginput: false,
    multiselect: true,
    multiboxonly: true,
    toolbar:[true,"top"],
    ondblClickRow: function(id) {
        var publishedUrl =
           $("#GridName").find("tbody")[0].rows[id-1].cells[5].innerHTML;
    },
    caption: "Grid Results"
}).navGrid('#GridNamePager', { add: false, edit: false, del: false,
                               search: false, cloneToTop:true })
  .navButtonAdd('#GridNamePager', { caption: "Save", onClickButton:
             function() { Save(); return false; }, position: "last" })
  .navButtonAdd('#GridNamePager', { caption: "Back", onClickButton:
             function() { redirectBack(); return false; }, position: "last" })

where

<table id="GridName" class="scroll"></table>
<div id="GridnamePager" class="scroll" style="text-align:center;"></div>
A: 

Probably the answer http://stackoverflow.com/questions/2678904/adding-button-to-jqgrid-top-toolbar would helps you? If not try to explain more exactly which elements of navigation bar or other jqGrid elements you would be move to another place.

Oleg
Want to replicate the folowing at bottom and top of grid.navGrid('#GridNamePager', { add: false, edit: false, del: false, search: false, cloneToTop:true }) .navButtonAdd('#GridNamePager', { caption: "Save", onClickButton: function() { Save(); return false; }, position: "last" }) .navButtonAdd('#GridNamePager', { caption: "Back", onClickButton: function() { redirectBack(); return false; }, position: "last" })
Spanner
@Spanner: look at http://stackoverflow.com/questions/3929896/adding-jqgrid-custom-navigation-to-top-toolbar/3932314#3932314. It seems that the solution is what you need.
Oleg