I am following the sample "igGrid integration with knockoutjs" , what am doing is i have following markup
<table id="grid1" data-bind="igGrid: {dataSource: viewModel, width: 1100, height: 500, primaryKey: 'ProductID', autoCommit: false, features: [ { name: 'Updating', editMode: 'row', columnSettings: [ { columnKey: 'ProductID', editorOptions: {readOnly: true} } ] }, {name: 'Sorting',type: 'local'}, {name: 'Paging',type: 'local',pageSize: 10}, { name: 'Tooltips', columnSettings: [ { columnKey: 'ProductID', allowTooltips: false }, { columnKey: 'Name', allowTooltips: true }, { columnKey: 'ProductNumber', allowTooltips: true } ], style: 'popover', visibility: 'always', showDelay: 1000, hideDelay: 500 } ], autoGenerateColumns: false, columns: [ {key: 'ProductID', headerText: 'Product ID', width: 80, dataType: 'number'}, {key: 'Name', headerText: 'Name', width: 150, dataType: 'string'}, {key: 'ProductNumber', headerText: 'Product Number', width: 100, dataType: 'string'}, ] }"></table>
and have following script
$("#grid1").live("iggridupdatingdatadirty", function (event, ui) { $("#grid1").igGrid("commit"); //saving local changes to the datasource when sorting return false; });
Now the issue is after sorting , if i try to update a record e.g in my case i update a name then it updates that record plus another record with the same name, this only happens after sorting, otherwise it works great.
Any help would be appreciated !
Hi Infragistics team,
Please let me know when it will be fixed.
Hi Martin,
Thanks for looking into it, um i will be looking forward to it(next volume). :-)
regards,
Khurram
Hi khurram,
I was able to reproduce the problem. It seems to be bug in our custom KnockoutJS binding. We will fix it for the next volume release.
Remember that KnockoutJS integration currently is a CTP and is normal to have bugs.
Thank you for you feedback.
Best regards,
Martin Pavlov
Infragistics, Inc.
Sorry i missed something in my first post, m also doing something like
//saving changes to datasource $("#grid1").live("iggridupdatingeditrowended", function (event, ui) { $("#grid1").igGrid("commit"); }); //saving changes to datasource $("#grid1").live("iggridupdatingrowdeleted", function (event, ui) { $("#grid1").igGrid("commit"); });
so that changes are being reflected at the same time back to datasource at client-side only.
khurram
Hi, thanks for replying, the thing is if i update something then only that is being updated(if grid is in its initial state, no sorting applied), but after sorting if i try to update something then two records are updated , i don't know why it is like that.