-
20 Feb 2007 5:23 AM #1
where is GridView.onRemove ?
where is GridView.onRemove ?
i remove a record in grid using ds.remove(record) method
but can't remove record with the same error:
l.fireFn has no properties
GridView.js
but i can't find GridView.OnRemove method, this is a bug or not completedCode:if(ds){ ds.on("datachanged", this.onDataChange, this); ds.on("add", this.onAdd, this); ds.on("remove", this.onRemove, this); ds.on("update", this.onUpdate, this); ds.on("clear", this.onClear, this); }
sorry for my english
-
20 Feb 2007 5:35 AM #2
It's a bug, the function is there but it's called "onDelete". I renamed onDelete to onRemove and all is well (also a change in onUpdate where it calls onDelete).
-
20 Feb 2007 7:05 AM #3
i rename onDelete to onRemove,but there is another bug
Store.js
ds.remove method delete record, then fire GridView.onRemoveCode:remove : function(record){ var index = this.data.indexOf(record); this.data.removeAt(index); this.fireEvent("remove", this, record, index); }
index always be -1 because record is deletedCode:onRemove : function(ds, record, isUpdate){ var index = typeof record == "number" ? record : this.ds.indexOf(record); ... }
-
20 Feb 2007 8:02 AM #4
I redeployed - check the new version.

-
22 Feb 2007 8:21 AM #5
same function name problem in View.js (onDelete vs. onRemove)
Also, there are references toIt should beCode:this.ds
now, right ?Code:this.store
Code:onDelete : function(ds, record){ this.clearSelections(); var index = this.ds.indexOf(record); this.el.dom.removeChild(this.nodes[index]); this.updateIndexes(index); }Code:onUpdate : function(ds, record){ this.clearSelections(); var index = this.ds.indexOf(record); var n = this.nodes[index]; this.tpl.insertBefore(n, this.prepareData(record.data)); n.parentNode.removeChild(n); this.updateIndexes(index, index); }
-
22 Feb 2007 4:28 PM #6
Thanks, I put in your fixes.
Similar Threads
-
GridView bufferRows FF bug?
By ericwaldheim in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 22 Mar 2007, 8:42 AM -
line 202 of widgets\grid\GridView.js
By papasi in forum Ext 1.x: BugsReplies: 1Last Post: 20 Mar 2007, 10:27 PM -
gridview error: re is not defined
By hicker in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 17 Mar 2007, 12:25 AM -
Issue with focus on selected row in GridView.js
By gcsolaroli in forum Ext 1.x: BugsReplies: 0Last Post: 15 Jan 2007, 9:24 AM -
GridView Cell Align
By Micha in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 20 Dec 2006, 11:49 AM


Reply With Quote