jquery ajax
$('#btnSearch').click(function () { $("#list").trigger("reloadGrid"); var customernumber = $("#txtCustomernumber").val(); var customername = $("#txtCustomername").val(); var usindicia = $("#txtUSIndicia").val(); var date = $("#txtCaptureddate").datepicker('getDate'); var captureddate = $.datepicker.formatDate("mm/dd/yy", date); $.ajax({ type: 'POST', url: '../../AJAXHandler/IndividualCustomer/IndividualCustomerInfo.ashx?method=search', dataType: "json", data: { CustomerNumber: customernumber, CustomerName: customername, UsIndicia: usindicia, CaputredDate: captureddate }, success: function (msg) { debugger; if (msg.d == "success") { alert("searching"); } } }); });
//postdata in jqgrid postData: { CustomerNumber: function () { return $("#txtCustomernumber").val(); }, CustomerName: function () { return $("#txtCustomername").val(); }, UsIndicia: function () { return $("#txtUSIndicia").val(); }, CaputredDate: function () { return $.datepicker.formatDate("mm/dd/yy", $("#txtCaptureddate").datepicker('getDate')); } },