I am facing one issue while sending the data to my controller.
The problem is i have one Paramquery grid and five textbox on screen. I am able to send data from grid alone but i have to send all grid data and textbox data at the same time as it is the requirement in my project. can someone suggest me how i can do that.
My code looks like :
$('body').on('click','#getreport',function(e)
{
var asofDate =$('#asofdate :selected').text();
var startDate = $('#startdate').val();
var endDate = $('#enddate').val();
var reporttype = $('#reporttype').val();
var format= $("input:radio[name=format]:checked").val();
var DM = $("#grid_json").pqGrid("option", "dataModel");
var griddata = DM.data;
alert('grid data...'+griddata);
$.ajax({
dataType : "json",
contentType : "application/json; charset=utf-8",
type : "POST",
async : false,
url : "getVesselList",
data : JSON.stringify(griddata),
mimeType : 'application/json',
success : function() {
alert("test...");
},
error : function(data, status, er) {
alert("error 565: " + " status: " + status + " er:" + er.message);
},
});
});
With this code i am able to get grid data in my controller but i want other values asofdate,enddate,startdate,reporttype,format at the same time. Please suggest me how i can achieve this.
Thanks