失去焦点对话框jqgrid

时间:2018-06-27 17:14:02

标签: twitter-bootstrap jqgrid

我正在创建一个网格,该网格位于模式(Bootstrap)上,但是当从jqgrid中单击添加按钮时,添加行的对话框丢失了,位于我的模式后面:

   var mydata =
    [
        { detalle: "comprar uniformes", plazo: "2007-10-01", responsable: "Diego Avila" },
    ]

$("#grid_plan_accion").jqGrid({
    datatype: 'json',
    data: mydata,
    colNames: ['example1', 'example2', ' example3'],
    colModel: [
        { label: 'detalle', name: 'detalle', width: 150, sorttype: "string", editable: true, edittype:"text", },
        { label: 'plazo', name: 'plazo', width: 150, sorttype: "string", editable: true,  
       /* editoptions: {
            // dataInit is the client-side event that fires upon initializing the toolbar search field for a column
            // use it to place a third party control to customize the toolbar
            dataInit: function (element) {
                $(element).datepicker({
                    id: 'orderDate_datePicker',
                    //dateFormat: 'M/d/yy',
                    dateFormat: 'yy/M/d',
                    //minDate: new Date(2010, 0, 1),
                    maxDate: new Date(2020, 0, 1),
                    showOn: 'focus'
                });
            }
        }*/
        },
        { label: 'responsable', name: 'responsable', width: 150, sorttype: "string", editable: true },
    ],
    rowNum: 10,
    width:750,
    height: 100,
    caption:'PLAN DE ACCION',
    shrinkToFit: true,
    pager: '#pager_plan_accion',
    editurl: "clientArray",
    onSelectRow: function(id){
        var lastSel="";
        if(id && id!==lastSel){ 
           jQuery('#grid_plan_accion').restoreRow(lastSel); 
           lastSel=id; 
        }
        jQuery('#grid_plan_accion').editRow(id, true); 
    },

});
$('#grid_plan_accion').navGrid('#pager_plan_accion',
{
    edit: false,
    add: true,
    del: false,
    search: false,
    refresh: false,
    view: true,
    position: "left",
    cloneToTop: false
});

for (var i = 0; i <= mydata.length; i++)
    jQuery("#grid_plan_accion").jqGrid('addRowData', i + 1, mydata[i]);

});

这是我生成网格的代码。

这是我在模态上的网格: my grid 仅当关闭我的模态时,我才会在对话框中添加行。

0 个答案:

没有答案