I get this message
Uncaught TypeError: Cannot call method 'getIdxById' of undefined
When I try to do var idx = this.dataview.getIdxById(dataContext.id);
in a var function outside my init. How can I access this? This is just the basic skeleton (customFormatter is apart of a column definition):
function($) {
/**
* @class test.test.testing
*/
/** @Static */
{
defaults : {
columns: [{id: "hello",
name: "hello",
field: "hello",
width: 150,
sortable: true,
formatter: customFormatter},],
}
},
/** @Prototype */
{
init : function() {
this._super(); //the grid
}
});
});
var customFormatter = function (row, cell, value, columnDef, dataContext) {
var idx = this.dataview.getIdxById(dataContext.id);
};