gijgo
gijgo copied to clipboard
cellDataChanged event is not working
cellDataChanged event is not triggering when clicking on outside the Gridor any other controls. It triggers only when we do mouse click on another editable cell. Can we have any option to overcome this issue. WE have a client delivery in few days.
Treat this as a critical issue.
Thanks, Lalith
grid.on('rowDataChanged', function (e, id, record) { // Clone the record in new object where you can format the data to format that is supported by the backend. var data = $.extend(true, {}, record); // Format the date to format that is supported by the backend. data.DateOfBirth = gj.core.parseDate(record.DateOfBirth, 'mm/dd/yyyy').toISOString(); // Post the data to the server $.ajax({ url: '/Players/Save', data: { record: data }, method: 'POST' }) .fail(function () { alert('Failed to save.'); }); }); you can rewrite
var data =null;
grid.on('rowDataChanged', function (e, id, record) {
// Clone the record in new object where you can format the data to format that is supported by the backend.
data = $.extend(true, {}, record);
});
$('#yourButton').on('click',function(){
$.ajax({ url: '/Players/Save', data: { record: data }, method: 'POST' })
.done(function(){
alert('saved');
})
.fail(function () {
alert('Failed to save.');
});
});