Extending igGrid > rendered and rowsRendered events.
New DiscussionI am trying to extend igGrid so I can control both rowRendered and rendered events. I was doing fine extending the object and adding some new functionality through new methods, but I can not add anything to these two events. Am I doing something wrong here?
This is the code I am using:
$.widget(‘ui.igGrid’, $.ui.igGrid, {
_create: function() {
console.log(‘Enters here’);
return this._super();
},
_rendered: function() {
console.log(‘NOT entering here’);
return this._super();
},
_rowsRendered: function() {
console.log(‘NOT entering here’);
return this._super();
},
myNewFunction: function(someObj) {
console.log(‘Enters here’);
}
});
$(‘#some-container’).igGrid({
data: […],
columns: […],
…
});
$(‘#some-container’).igGrid(‘myNewFunction’, {});
As you can see, I am calling myNewFunction after the igGrid is instantiated. But what I would really wanted to do is call the myNewFunction when events like rendered/rowRendered are fired. Is it a way to do this?
You can see here and example running: http://jsfiddle.net/newpatriks/xykh1gL1/
Thanks in advance.