在JQGrid中搜索后,搜索对话框不会关闭 [英] Search dialog won't close after search in JQGrid
本文介绍了在JQGrid中搜索后,搜索对话框不会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
晚上好.......
我正在其中的jqgrid上工作,我已经添加了两个用于添加和编辑的自定义按钮..
但是当我去搜索的时候会出现问题.....
搜索完成后,搜索对话框不会关闭……
jqgrid的代码是
Hi good evening..........
I am working on jqgrid in there i have added tow custome buttons for add and edit..
but the problem occurs when i go for searching.....
THe search dialog dont get close when searching gets finish......
the code for jqgrid is
$("#State").jqGrid({
url: 'Handlers/StateHandler.ashx',
editurl: 'Handlers/StateHandler.ashx',
datatype: "xml",
mytype: "GET",
width: 736,
height: "100%",
colNames: ['StateName', 'CountryName'],
colModel: [
{ name: 'StateName', index: 'StateId', editable: true,edittyp: 'text', editrules: { required: true} },
{ name: 'CountryName', index: 'CountryId', editable: true, sorttype: 'text', editrules: { edithidden: true }, edittype: "select",
editoptions: { dataUrl: 'Handlers/dropdown.ashx?pageName=State' }
}
],
pager: "#pager",
caption: "State",
sortName: 'StateId',
rowNum: 10,
sorttype: 'asc',
rowList: [10, 20, 30],
viewrecords: true
}).navGrid("#pager", { edit: true, add: true, del: true, search: true },
{closeAfterSearch: true, drag: true, closeOnEscape: true, afterShowSearch: function() {
$.post("Handlers/StateHandler.ashx?valSearch=true", {}, function(data) { });
}}
);
$("#OtherMasterGrid").navButtonAdd('#pager1', { position: "first", caption: "",title:"Add new "+tableName, buttonicon: "ui-icon-plus",onClickButton: function() {
operation = "add";
window.location = NavigatePageName+"?Event=add&tableName=" + tableName + "&MenuId=" + $(".MenuId").val();
}
}
);
$("#OtherMasterGrid").navButtonAdd('#pager1', { position: "first", caption: "",title:"Edit selected "+tableName, buttonicon: "ui-icon-pencil", onClickButton: function() {
operation = "edit";
if (parentRowId == null) {
alert("Please,select row");
}
else
{
window.location.href = NavigatePageName+'?rowid=' + parentRowId + '&Event=edit&tableName=' + tableName + "&MenuId=" + $(".MenuId").val();
}
}
}
);
如果您为何未关闭搜索对话框,请告诉我...
预先THanx
If you gwt that why search dialog is not get closed then please let me know......
THanx in advance
推荐答案
(" ).jqGrid({ 网址:' Handlers/StateHandler.ashx', editurl:' Handlers/StateHandler.ashx', 数据类型:" , mytype:" , 宽度: 736 , 高度:" , colNames:[' StateName',' 国家名称'], colModel:[ {名称:' StateName',索引:' StateId',可 true ,edittyp:' 文本',编辑规则:{必需: true }}, {名称:' CountryName',索引:' CountryId',可 true ,排序类型:' 文本',编辑规则:{edithidden: true },编辑类型: 选择", editoptions:{dataUrl:' Handlers/dropdown.ashx?pageName = State'} } ], 传呼机:" , 标题:" , sortName:' StateId', rowNum: 10 , 排序类型:' asc', rowList:[ 10 , 20 , 30 ], viewrecords: true }).navGrid(" ,{ true ,添加: true ,del: true ,搜索: true }, {closeAfterSearch: true ,拖动: true ,closeOnEscape: true ,afterShowSearch:function(){
("#State").jqGrid({ url: 'Handlers/StateHandler.ashx', editurl: 'Handlers/StateHandler.ashx', datatype: "xml", mytype: "GET", width: 736, height: "100%", colNames: ['StateName', 'CountryName'], colModel: [ { name: 'StateName', index: 'StateId', editable: true,edittyp: 'text', editrules: { required: true} }, { name: 'CountryName', index: 'CountryId', editable: true, sorttype: 'text', editrules: { edithidden: true }, edittype: "select", editoptions: { dataUrl: 'Handlers/dropdown.ashx?pageName=State' } } ], pager: "#pager", caption: "State", sortName: 'StateId', rowNum: 10, sorttype: 'asc', rowList: [10, 20, 30], viewrecords: true }).navGrid("#pager", { edit: true, add: true, del: true, search: true }, {closeAfterSearch: true, drag: true, closeOnEscape: true, afterShowSearch: function() {
.post(" ,{},function(data){}); }} );
.post("Handlers/StateHandler.ashx?valSearch=true", {}, function(data) { }); }} );
(" span>).navButtonAdd(' #pager1',{位置: 第一个",标题: ",标题: 添加新的" + tableName,buttonicon:"
("#OtherMasterGrid").navButtonAdd('#pager1', { position: "first", caption: "",title:"Add new "+tableName, buttonicon: "ui-icon-plus",onClickButton: function() { operation = "add"; window.location = NavigatePageName+"?Event=add&tableName=" + tableName + "&MenuId=" +
这篇关于在JQGrid中搜索后,搜索对话框不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文