의 "이"외부 나는이 메시지전화는 초기화
Uncaught TypeError: Cannot call method 'getIdxById' of undefined
를 얻을. 어떻게 접근 할 수 있습니까? 당신은 충분한 정보를 제공하지 않은
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);
};
엄밀히 말하면 우리는 'customFormatter' 함수가 호출되는 범위 또는 호출 될 범위가 무엇인지 추측해야합니까? 올바른 범위를 설정하기 위해'apply()'또는'call()'을 사용하는 것은 아마도 답이지만 누가 알 수 있습니까? – adeneo
형식. 설명. – marekful
방금 편집했습니다 ... –