Model view controller 如何在jqgrid中有两个寻呼机,一个在顶部,一个在底部?

Model view controller 如何在jqgrid中有两个寻呼机,一个在顶部,一个在底部?,model-view-controller,jqgrid,pager,Model View Controller,Jqgrid,Pager,这是我的密码 $(document).ready(function () { $('#jqgProducts').jqGrid({ url: '/Home/GridSampleData/', // url from which data should be requested datatype: 'json', // type of data mtype: 'GET', //

这是我的密码

 $(document).ready(function () {
     $('#jqgProducts').jqGrid({
         url: '/Home/GridSampleData/', // url from which data should be requested
         datatype: 'json',             // type of data
         mtype: 'GET',                 // url access method type
         colNames: ['userid', 'username', 'email', 'contact', 'password'],
         colModel: [                   // columns model
             { name: 'userId', index: 'userId', align: 'left',
               editable: false },
             { name: 'username', index: 'username', align: 'left',
               editable: true, edittype: 'text',
               editoptions: { maxlength: 20 },
               editrules: { required: true} },
             { name: 'email', index: 'email', align: 'left', editable: true,
               edittype: 'text', editoptions: { maxlength: 50 },
               editrules: { required: true} },
             { name: 'contact', index: 'contact', align: 'left',
               editable: true, edittype: 'text',
               editoptions: { maxlength: 20 }, editrules: { required: true} },
             { name: 'password', index: 'password', align: 'left',
               editable: true, edittype: 'password',
               editoptions: { maxlength: 20 },
               editrules: { required: true} }
         ],
         pager: $('#jqgpProducts'), // pager for grid
         rowNum: 5,                 // number of rows per page
         sortname: 'userId',        // initial sorting column
         sortorder: 'asc',          // initial sorting direction
         viewrecords: true,         // we want to display total records count
         width: '600',              // grid width
         height: 'auto'             // grid height
     });
 });
在jqGrid选项列表中包括“toppager:true”。这正是您想要的:“启用此选项后,将一个寻呼机元素放置在标题下方的网格顶部(如果可用)。如果定义了另一个寻呼机,则两者可以共存并同步刷新。”


您可以在

上找到完整的选项列表,这已经晚了4年,但我看到了类似的内容,模板选项

 template: '<div>' +
             '<div class="jqgrid-pagination"></div>' +
             '<table></table>' +
             '<div class="jqgrid-pagination"></div>' +               
           '</div>',
模板:“”+
'' +
'' +
'' +               
'',

谢谢Oleg,他帮了我很多忙ton@Allen:不客气!如果您想对寻呼机进行更多的自定义,我的另一个答案可能也会让您感兴趣。@Oleg-这是将其放在顶部中间还是左上方?@ooo:“toppager:true”创建的寻呼机与通常在底部看到的寻呼机相同。@Oleg。我使用了toppager:true和cloneToTop:true,但是我的搜索、刷新和列重新排序/隐藏按钮不会转移到toppager。顶部仅显示分页按钮。我必须明确地将这些按钮添加到顶部寻呼机吗?