I have tried to follow question in stackoverflow, but this doesn't help me in my case. I have a checkbox on my web-page, which if gets clicked(true) shows, only negative values. I am trying to send data from my JS file to Controllers with change parameters so the grid with negative values comes up. But I am not getting any hit on controller while debugging it.
//Check for Negative Option
var negative;
$('#checkbox').click(function(){
{
var selected= $('#txtSelected').val();
var summary=$("#chkSummary").is(":checked");
var negative = $("#checkbox").is(":checked");
var locationIdList=$('#locationId').val()
ReloadGrid(selected, summary, negative, locationIdList);
}
})
Where StatusGridId is the name of my table.
function ReloadGrid(selected,summary,negative,locationId) {
$("#StatusGridId").jqGrid('clearGridData');
//Reload grid trigger
$("#StatusGridId").jqGrid('setGridParam',
{
url: "/Reports/GetStatus?"+"locationIdList="+locationId,
postData:{selected: selected, summary:summary, negative: negative}
}).trigger('reloadGrid');
}
My controller where I am not reciving any hit while debugging:
public JsonResult GetStatus ( string sidx, string sord, int? page, int? rows, string selected, string locationIdList, bool? summary, bool? negative )
{
-----code------
}