Hi,
How will I refresh the grid on saving through ajax call:
var dailyData =DayColGridDataField;
var dailysrc =
{
datatype: "json",
datafields:daydataFieldColumns,
localdata: dailyData,
url: 'jqxgridDaily.htm',
};
$("#jqxgridDaily").jqxGrid(
{
width: 1015,
pagesizeoptions: ['10', '15', '20'],
pagesize: 15,
source: dataAdapter,
autoheight: true,
sortable: false,
pageable: true,
altrows: true,
editable: true,
enabletooltips: true,
theme: 'energyblue',
showstatusbar: true,
statusbarheight: 25,
showaggregates: true,
columnsheight: 50,
columnsresize: true,
selectionmode: 'multiplecellsadvanced',
columns:daygridColumns
});
$("#btnDailySave")
.click(
function() {
$.ajax(
{
url : "saveDailyEntry.htm,
cache : false,
type : "POST",
contentType:'application/json;charset=utf-8',
async : false,
dataType : "json",
data : JSON.stringify(editedRow)
})
.done(
function(data) {
alert("Daily based TS Entry data saved essfully.");
$(
'#jqxgridDaily')
.trigger(
'reloadGrid');
}).fail(function() {
alert("Daily based TS Entry not saved. Please try after some time");
});
<strong>dailysrc.localdata = dailyData;
$("#jqxgridDaily").jqxGrid('updatebounddata');
dataAdapter.dataBind();</strong>
}
}
});
});