内置的搜索面板会禁用带有搜索面板的整个网格.还有2个问题 [英] Builtin search panel disable whole grid with search panel. 2 more questions

查看:43
本文介绍了内置的搜索面板会禁用带有搜索面板的整个网格.还有2个问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1-是否可以更改添加"和编辑"弹出窗口的布局?

1 - Is it possible to change the layout of Add and Edit popups?

2-如何在编辑"弹出窗口中禁用导航?左右按钮可浏览记录.

2 - How to disable navigation in the Edit popup?. Right and left buttons to navigate through records.

3-我正在测试内置在搜索中的JQGrid.问题是我什么时候单击那个小的搜索图标 弹出窗口禁用整个网格,并在其顶部的搜索面板上.尝试了很多但没有成功. 注意:所有其他面板(例如编辑",添加"等)都可以正常工作

3 - I am testing JQGrid built in search. Problem is when ever I click on that small search icon popup disable whole grid with it search panel on top of it. Tried alot but no success. Note: All the other panels like Edit, Add etc are working fine

jQuery().ready(function () {

    jQuery("#list10").jqGrid({
        //url: 'server.php?q=2',
        data: mydata1,
        datatype: "local",
        colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
        colModel: [
            { name: 'id', index: 'id', width: 55 },
            { name: 'invdate', index: 'invdate', width: 90 },
            { name: 'name', index: 'name asc, invdate', width: 100 },
            { name: 'amount', index: 'amount', width: 80, align: "right" },
            { name: 'tax', index: 'tax', width: 80, align: "right" },
            { name: 'total', index: 'total', width: 80, align: "right" },
            { name: 'note', index: 'note', width: 150, sortable: false }
        ],

        rowNum: 10,
        rowList: [10, 20, 30],
        pager: '#pager10',
        sortname: 'id',
        viewrecords: true,
        sortorder: "desc",
        caption: "JSON Example"
    });
    jQuery("#list10").jqGrid('navGrid', '#pager10', { edit: false, add: false, del: false }); 
});


                 var mydata1 = [
  { id: "1", invdate: "2010-05-24", name: "test", note: "note", tax: "10.00", total: "2111.00" },
  { id: "2", invdate: "2010-05-25", name: "test2", note: "note2", tax: "20.00", total: "320.00" },
  { id: "3", invdate: "2007-09-01", name: "test3", note: "note3", tax: "30.00", total: "430.00" },
  { id: "4", invdate: "2007-10-04", name: "test", note: "note", tax: "10.00", total: "210.00" },
  { id: "5", invdate: "2007-10-05", name: "test2", note: "note2", tax: "20.00", total: "320.00" },
  { id: "6", invdate: "2007-09-06", name: "test3", note: "note3", tax: "30.00", total: "430.00" },
  { id: "7", invdate: "2007-10-04", name: "test", note: "note", tax: "10.00", total: "210.00" },
  { id: "8", invdate: "2007-10-03", name: "test2", note: "note2", amount: "300.00", tax: "21.00", total: "320.00" },
  { id: "9", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" },
  { id: "11", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
  { id: "12", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
  { id: "13", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" },
  { id: "14", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
  { id: "15", invdate: "2007-10-05", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
  { id: "16", invdate: "2007-09-06", name: "test3", note: "note3", amount: "400.00", tax: "30.00"

推荐答案

您一次问了很多问题.所以一个接一个.

You asked many questions at once. So one after other.

  1. 您没有在添加和编辑弹出窗口的布局"下描述您的意思.对话框的所有标准设置(例如位置,宽度,高度等)都可以找到此处找到搜索对话框的参数.设置overlay:false应该可以为您提供帮助.
  1. You don't described what you mean under "the layout of Add and Edit popups". All standard settings of the dialogs like position, width, height and so on you can find here. All other dynamic changes of layout you can do inside of beforeShowForm event handler which you could define.
  2. The easiest way to disable navidation buttons is to include .navButton { display:none; } in you CSS.
  3. Parameters of the search dialog you can find here. The setting overlay:false should help you.

因此您可以替换行

jQuery("#list10").jqGrid('navGrid', '#pager10', {edit:false, add:false, del:false}); 

具有类似以下内容

jQuery("#list10").jqGrid('navGrid', '#pager10',
                         {edit:false, add:false, del:false},
                         {top:200,left:300,recreateForm:true}, // edit settings
                         {top:100,left:200,recreateForm:true}, // add settings
                         {overlay:false} // search settings
);

这篇关于内置的搜索面板会禁用带有搜索面板的整个网格.还有2个问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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