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();
}
}
}
);
If you gwt that why search dialog is not get closed then please let me know......
THanx in advance