Hi ,
I tried the above example and it is not working for me. Here is my code.
$(“#addselected”).click(function(){
debugger
var offtypeid = $(“#offTypeid”).val();
var rows = $(“#grid1”).jqxGrid(‘getrows’);
var str = JSON.stringify(rows);
$.ajax({
url: “/OfficeTerritory/AddSelected”,
type: “POST”,
data: {
delchkboxloglist: str,
officeid: officeid,
offtypeid: offtypeid
},
dataType: “json”,
success: function(data){
source.localdata = data;
$(‘#grid’).jqxGrid(‘updatebounddata’);
}
});
public JsonResult AddSelected(string officeid, string offtypeid, string delchkboxloglist)
{
List<Location> model = new JavaScriptSerializer().Deserialize<List<Location>>(delchkboxloglist);
OfficeTypeLocation otl = new OfficeTypeLocation();
otl.AddOfficeTypeLocation(officeid, offtypeid, model);
List<OfficeTypeLocation> list = otl.GetOfficeTypeLocation(Convert.ToInt16(offtypeid), Convert.ToInt16(officeid));
return Json(list, JsonRequestBehavior.AllowGet);
}