Hi ,
This is the function Im writing to create a custom eXcell type for price.
The aim is to have a comma seperator for the number and the $ symbol as well.
So 123456 is displayed as $123,456. But once I implement this , the inbuilt sort in my dhtmlx grid fails to work 
Is there a solution . Pls help!
function thousandSeparator(num) {
var o=num;
num = num.toString().replace(/$|,/g,’’);
if(isNaN(num) || num==’’) return o;
num=Math.round(num)
sign = (num == (num=Math.abs(num)));
num=num.toString();
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4i+3))+’,’+ num.substring(num.length-(4i+3));
return (sign>0?’’:’-’)+num+’’ ;
}
function eXcell_myprice(cell) {
this.base = eXcell_price;
this.base(cell);
this.setValue = function(val) {
if(val.toString().trim()==""){
val = " ";
this.cell.innerHTML = val;
}
else{
val="$"+thousandSeparator(val);
this.cell.innerHTML = val;
}
this.cell.innerHTML = this.grid._aplNF(val, this.cell._cellIndex);
}
}
eXcell_myprice.prototype = new eXcell_price;
Regards,
Shraddha