Hi,
Our model has various cells that are base64 encoded (see below).
Some of the rows have a colspan set to greater than one.
I’ve written a custom excell object to handle the decoding of the cells value inside the setvalue function.
However the setvalue() is called n times for each cell where colspan is n.
The problem is that it appears a new cell is passed through every time, however the textContent is persisted, which means that the final text is encoded more than once!
I can implement non-dhtmlxgrid solutions, however I cannot find an elegant framework based solution to this problem.
MTIzNA== ZG9tYWluNy5jby51ay4== MzYwMA== 0function eXcell_edbase64(cell){
if (cell){
this.cell = cell;
this.grid = this.cell.parentNode.grid;
eXcell_ed.call(this);
}
this.setValue = function(val){
if (!this.initialised) {
// this gets called twice by a cell object with a colspan of 2
//The first time the cells textContent is MTIzNA==
//The second time the cells textContext is 1234
var decodedVal = BASE64.decode(val);
this.setCTxtValue(decodedVal,decodedVal);
// First time the decodedVal is 1234, and sets the cells textContent to 1234
// Second time the cells decodelVal becomes munged
}
}
this.getValue = function(){
var val = this.cell.textContent;
if (val == undefined) {
val = this.cell.innerText;
}
return val;
}
this.detach=function(){
var val = this.cell.childNodes[0].value;
if (val == undefined) {
val = this.cell.innerText;
}
this.setValue(BASE64.encode(val));
return this.val!=this.getValue(); // compare the new and the old values
}
}
eXcell_edbase64.prototype = new eXcell;
Thanks
DD.