Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joe Forest on Jun 30, 2008 12:15
open dhtmlx forum
Custom eXcell: "this.setCValue is not a function"

Hi,

When I try to use the following custom eXcell, I get the error: "this.setCValue is not a function".
Column type is set to "edA". Grid name is "mygrid".
I copied this code from custom eXcell example page.

function eXcell_edA(cell){
if (cell){
this.cell = cell;
this.mygrid = this.cell.parentNode.mygrid;
}
this.edit = function(){}
this.isDisabled = function(){ return true; }
this.setValue=function(val){
this.setCValue("<span>"+val+"</span>",val); //html text box will go between spans later
}
this.getValue=function(){
return this.cell.firstChild.value;
}
this.edit=function(){
eXcell_ed.call(this);
}
this.detach=function(){
eXcell_ed.detach(this);
}
}
eXcell_ro.prototype = new eXcell;
Answer posted by Support on Jul 01, 2008 01:51
Thera two incorrect places

this.mygrid = this.cell.parentNode.mygrid;
must be
this.grid = this.cell.parentNode.mygrid;

eXcell_ro.prototype = new eXcell;
must be
eXcell_edA.prototype = new eXcell;