I am using knockout to bind data to a grid. If I click on a checkbox and move to another cell the value is getting committed. If I click the checkbox then click on a save button the value is not getting committed and when i call the commit method on the grid the value of the checkbox reverts back to its original state
Hello,
I would recommend you to use save changes method before commiting data as shown below:
$(".selector").igGrid("saveChanges");
Refer to the “METHODS” tab on the API document link below for more details on this method:
http://help.infragistics.com/jQuery/2013.1/ui.iggrid
I hope this helps.
That does not work. The changes revert back to their original state. The only way I can get this to work is by faking the grid out and starting an edit on another row.
$('#grid1').igGridUpdating('startEdit', 1, 1);
$("#grid1").igGrid("commit");
Thank you for the update. I would recommend you to use below line of code to end editing before using save method:
$("#grid").igGridUpdating("endEdit");
If the issue is still present after using above line of code, provide me with the grid’s initialization code so I may look in to this.
I was able to see this behavior in the attached sample. I am looking in to the case of this behavior. Meanwhile you can test the attached sample to confirm if the sample demonstrates behavior you described. I will update you further by the end of the day Monday with more details on this.
I have opened a new private support CAS-120382-M3Y9S1 for you. I will provide more details on the support case CAS-120382-M3Y9S1.
Would you mind posting the solution to this? We are going to try the "endEdit" but want to make sure we have all the pieces of the puzzle since we are having the same issue.
That was it! Thank you for the super quick repsonse!
Currently I have the data bound to a table via knockout.
<table id="myGrid" data-bind="igGrid: {
.....
dataSource: data,
autoCommit: false,
renderCheckboxes: true,
}"></table>
Before I post the changes to the server I make sure to call an endEdit and commit the values. Make sure to pass in true as the second argument for endEdit so the values update.
$('#myGrid').igGridUpdating('endEdit', true);
$("#myGrid").igGrid("commit");