I have code:
...
function Edit(id) { ... }
...
view : new Ext.grid.GroupingView({
groupTextTpl : '... <a href="#" onClick="Edit({[values.rs[0].data["id"]]})">link</a>...'
...
Everything works, but it would be something on the similarity:
...
Ext.get('edit').on('click', function() {
alert(this.getValue());
});
...
view : new Ext.grid.GroupingView({
groupTextTpl : '... <a href="#" id="edit" value="{[values.rs[0].data["id"]]}">link</a>...'
...
But for some reason does not work, error – Ext.get (“edit”) is null.
What am I doing wrong?
Ext.get('edit')gets called before it is created, hence the error. Put theExt.get()below theGroupingView()