Unanswered: grid with data writer - help!
Help, I can not get passed this error: 'this.getSelectionModel is not a function' in firebug. I'm trying to implement a variation of "grid with data writer" from the extjs4 examples: My variation is I have a checkcolumn with an editor that when, the checkbox is unchecked, the proxy runs a store operation. The problem is I don't think the selection model is getting loaded right, because when the browser load gets to this line: "this.getSelectionModel().on('selectionchange', this.onSelectChange, this);", it blows up. If I take that line out, the page will load, but when I run onDeleteClick(), I get a firebug error that says this.getView() is undefined.
You gotta post your code... and use the CODE or PHP tags!
To save time, here's a quesiton: at a fundamental level, do I need to extend 'Ext.grid.Panel', not extend: 'Ext.panel.Panel' in order to get 'getSelectionModel' and methods like that to work? It seems like that's a big difference between my app and the writer.js example from Sencha ("grid with data writer" example). I have three grids setup in three tabs and that's why I went the panel.Panel route.
Sorry, I don't have time to post the code. I'll re-post with code this weekend, probably start a different thread. Any help much appreciated!
Again, without any code I literally have no idea what you're trying to do... no matter how you try to explain it. It sounds rather complicated.
To answer your basic question, the Ext.grid.Panel class would have the getSelectionModel() and related methods. Ext.panel.Panel does not.
If you look in the API docs...
..and look in the right-hand corner of that method definition, you'll see it's defined on Ext.panel.Table.
Looking at the "hierarchy" in the API for Ext.panel.Table, you can see that it extends Ext.panel.Panel.
So the inheritance chain is:
Grid < Table < Panel
Long story short, the Panel() class DOES NOT have those methods. I hope that helps.