我希望Filter克隆到顶部,但它被克隆到底部导航工具栏 [英] I want Filter to clone to top but it is cloned to bottom navigation toolbar

查看:53
本文介绍了我希望Filter克隆到顶部,但它被克隆到底部导航工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  <script type="text/javascript">
        $(document).ready(function () {

            
                $("#UsersGrid").GridUnload();
                gridload();
           
        });

        function gridload() {
            jQuery("#UsersGrid").jqGrid({

                url: 'Handler2.ashx' ,
                datatype: 'json',
                mtype: 'POST',
                colNames: ['BusinessUnit','UserId'],
                colModel: [
                   { name: 'BusinessUnit', index: 'Businessunit', width: '450', align: 'center',editable: true},
                   { name: 'UserId', index: 'UserId', width: '60', align: 'center',editable: true,key:true,hidden:true},      
                                
                              
                            ],
                rowNum: 10,
                rowList: [10, 20],
                imgpath: 'Themes', width: "auto", height: "auto",
                pagerpos: 'center',
                ignoreCase: true,
                width: '450',
                gridview: true,
               // sortname: 'TOTALPRICE',
                sortable: false,
                scrollOffset: 0,
                viewrecords: true,
                toppager: true,
                sortorder: 'desc',
               
                pager: '#UsersGridPager' 
                });
  jQuery("#UsersGrid").jqGrid('navGrid', '#UsersGridPager',
            { edit: true, add: true, del: true, search: false, excel: true, exceltext: 'Excel', cloneToTop: true },
            { url: "Handler2Copy.ashx", closeAfterEdit: true },
            { url: "Handler2Copy.ashx", closeAfterAdd: true },
            { url: "Handler2Copy.ashx", closeAfterDel: true },
            { closeAfterSearch: true, closeOnEscape: true, multipleSearch: false, cloneToTop: true });

 $("#UsersGrid").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "eq", toppager: true, cloneToTop: true });
            $("#UsersGrid").jqGrid('navButtonAdd', '#UsersGridPager', { caption: "Filter", title: "Toggle Searching Toolbar", buttonicon: 'ui-icon-pin-s', onClickButton: function () { $("#UsersGrid")[0].toggleToolbar(); } });
            $("#UsersGrid")[0].toggleToolbar();
<pre> };
    

    </script>

推荐答案

(文件).ready(function() {
(document).ready(function () {


(#UsersGrid)。GridUnload();
gridload();

});

函数gridload(){
jQuery(#UsersGrid)。jqGrid({

url:'Handler2.ashx',
datatype: 'json',
mtype:'POST',
colNames:['BusinessUnit','UserId'],
colModel:[
{name:'BusinessUnit',index: 'Businessunit',宽度:'450',对齐:'center',可编辑:true},
{名称:'UserId',索引:'UserId',宽度:'60',对齐:'center', editable:true,key:true,hidden:true},


],
rowNum:10,
rowList:[10,20],
imgpath:'Themes',width:auto,height:auto,
pagerpos:'center',
ignoreCase:true,
width:'450',
gridview:true,
// sortname:'TOTALPRICE',
sortable:false,
scrollOffset:0,
viewrecords:true,
toppager:true,
sortorder:'desc',

pager:'#UsersGridPager'
});
jQuery(#UsersGrid)。jqGrid('navGrid','#UsersGridPager',
{edit:true,add:true,del:true,search:false,excel:true,exceltext: 'Excel',cloneToTop:true},
{url:Handler2Copy.ashx,closeAfterEdit:true},
{url:Handler2Copy.ashx,closeAfterAdd:true},
{ url:Handler2Copy.ashx,closeAfterDel:true},
{closeAfterSearch:true,closeOnEscape:true,multipleSearch:false,cloneToTop:true});
("#UsersGrid").GridUnload(); gridload(); }); function gridload() { jQuery("#UsersGrid").jqGrid({ url: 'Handler2.ashx' , datatype: 'json', mtype: 'POST', colNames: ['BusinessUnit','UserId'], colModel: [ { name: 'BusinessUnit', index: 'Businessunit', width: '450', align: 'center',editable: true}, { name: 'UserId', index: 'UserId', width: '60', align: 'center',editable: true,key:true,hidden:true}, ], rowNum: 10, rowList: [10, 20], imgpath: 'Themes', width: "auto", height: "auto", pagerpos: 'center', ignoreCase: true, width: '450', gridview: true, // sortname: 'TOTALPRICE', sortable: false, scrollOffset: 0, viewrecords: true, toppager: true, sortorder: 'desc', pager: '#UsersGridPager' }); jQuery("#UsersGrid").jqGrid('navGrid', '#UsersGridPager', { edit: true, add: true, del: true, search: false, excel: true, exceltext: 'Excel', cloneToTop: true }, { url: "Handler2Copy.ashx", closeAfter true }, { url: "Handler2Copy.ashx", closeAfterAdd: true }, { url: "Handler2Copy.ashx", closeAfterDel: true }, { closeAfterSearch: true, closeOnEscape: true, multipleSearch: false, cloneToTop: true });


(# UsersGrid)。jqGrid('filterToolbar',{stringResult:true,searchOnEnter:false,defaultSearch:eq,toppager:true,cloneToTop:true});
("#UsersGrid").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "eq", toppager: true, cloneToTop: true });


这篇关于我希望Filter克隆到顶部,但它被克隆到底部导航工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆