Hi,
I am using dhtmlxgrid with setColtypes(ro,edn,edn,edn) to display some text in read only format and numeric values with percentage.Now along with the percentage i wanted to display dynamic of sales(i.e dyn) cell editor for numeric values.Can you please help me with this.
You may try to create your own new custom ExCell type on the basic of any needed other type.
Here you can see the example (the first column): dhtmlx.com/docs/products/dht … ormat.html
function eXcell_mydyn(cell) {
this.base = eXcell_edn;
this.base(cell);
this.setValue = function(val) {
if (!val || val.toString()._dhx_trim() == “”){
val = “0”;
}
else if (val >= 0){
val="^"+val+"%";
this.cell.style.color = “green”;
}
else{
val=val+"%";
this.cell.style.color = “red”;
}
this.cell.innerHTML = this.grid._aplNF(val, this.cell._cellIndex);
}
}
eXcell_mydyn.prototype = new eXcell_edn;
I have used the above customized function for getting % along with dyn but when the value is less than zero i am unable to give the symbol for dyn(am able to give only red color).Can you please help in this issue.