【问题标题】:Builtin search panel disable whole grid with search panel. 2 more questions内置搜索面板使用搜索面板禁用整个网格。还有2个问题
【发布时间】:2010-12-18 09:25:44
【问题描述】:

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

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

3 - 我正在测试内置搜索的 JQGrid。问题是当我点击那个小搜索图标时 弹出窗口禁用整个网格,并在其顶部使用搜索面板。尝试了很多但没有成功。 注意:编辑、添加等所有其他面板工作正常

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"

【问题讨论】:

    标签: jqgrid


    【解决方案1】:

    你一次问了很多问题。所以一个接一个。

    1. 您没有在“添加和编辑弹出窗口的布局”下描述您的意思。对话框的所有标准设置,如位置、宽度、高度等,您都可以找到here。您可以在您可以定义的 beforeShowForm 事件处理程序中对布局进行所有其他动态更改。
    2. 禁用导航按钮的最简单方法是在 CSS 中包含 .navButton { display:none; }
    3. 搜索对话框的参数你可以找到here。设置overlay:false 应该会对您有所帮助。

    所以你可以换行

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

    【讨论】:

      猜你喜欢
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-28
      相关资源
      最近更新 更多