I am trying to apply a jqxNumberInput
dynamically to any number columns within my grid. However, when I click to edit the row, it does not apply the number input and when I try to tab away from the cell, I get an error saying “Uncaught TypeError: undefined is not a function”.
Here is a snippet of my code:
for(var x in data.columns){
if(typeof data.columns[x].cellsformat!=='undefined'){
data.columns[x] = $.extend({
createeditor: function(row,cellvalue,editor){
editor.jqxNumberInput({ digits: 3 });
}
},data.columns[x]);
}
}
$('#grid').jqxGrid({
source: dataAdapter,
selectionmode: 'singlerow',
columns: data.columns,
editable: true,
editmode: 'selectedrow',
rendergridrows: function(obj){
return obj.data;
}
});