I have an observable array that is bound to an igGrid. When removing item from the array the grid does a strike through of the removed item. I have autocommit set to true so I would expect the grid to actually remove the item from the UI as well.
Digging into this a little further I found that the delete transaction was not committing and remained in the pendingtransactions array. I tried to manually commit the transaction and rebind the grid to the array. When making the call to commit I received an exception 'this._super' is undefined in the file infragistics.datasource.knockout.js in the _deleteRow function. My file version is (12.2.20122.2056) I have highlighted the line of code that throws the exception below. Has anyone else eperienced/fixed this issue?
Thanks,
Chad
_deleteRow: function (d) {
var c = this.settings.primaryKey,
b = this.kods;
b = ko.isObservable(b) ? b() : b;
if (this.settings.responseDataKey && b[this.settings.responseDataKey]) {
b = b[this.settings.responseDataKey] }
if (ko.isObservable(b)) {
if (!this._koUpdate) {
b.remove(function (e) {
return (ko.isObservable(e[c]) ? e[c]() : e[c]) === d }) } else
{
this._koUpdate = false
}
} else {
this._super(d)
Hello from me,
Could you please attach a sample with the issue?
Also, could you please try the latest available 12.2 code - I hope that you won't get the exception "'this._super' is undefined" with that build.
These are the links to the latest knockout files:
http://cdn-na.infragistics.com/jquery/20122/latest/js/extensions/infragistics.ui.grid.knockout-extensions.js
http://cdn-na.infragistics.com/jquery/20122/latest/js/extensions/infragistics.datasource.knockoutjs.js
regards
Lyubo
Thank you for the response Lyubo.
I have attached one of the examples I have been working with. What I am seeing with the latest codebase you mention above is when you remove an item from an observable array it no longer throws an exception, it removes the wrong row from the grid. For example if I delete an item from my observable array where the id is equal to "3" the grid is updated but always removes the last row of the grid. From what I can tell the index of the row to remove is being set incorrectly in the infragistics.ui.grid.knockout-extensions.js update method and passed to the deleterow method.
Using the out-of-box deleterow functionality in the grid is reflected correctly in the grid and the observable array, but going the other direction the removal of an item from the observable array is not reflected correctly in the grid.
hi Chad,
The bug fix will be available with the next SR which approximate date is currently 1 February.
However, you'll need to make a small modification in your code.
Your "id" is quoted here as a string, { "id": "1", "startDate": "01/01/2012", "endDate": "1/31/2012", "description": "Activity 1" },
while you've specified in the grid that it's type is number.
You will need to change your code to use numbers for the PK(id) column like this:
{ "id": 1, "startDate": "01/01/2012", "endDate": "1/31/2012", "description": "Activity 1" }
regards Lyubo
Hi Chad,
I have created a support ticket on your behalf with ID CAS-108724-T3K9Z0. You can view the status of the Development issue, linked to this case in the website by navigating to Account – Support Activity. Select your ticket and go to Development Issues tab.
If you have any questions, please do not hesitate to ask.
Thanks for the sample. As far as I can see it sounds like a bug to me.
I'll get back to you once it's fixed.
Regards