treegrid : change cell content


I have a question about changing cells content in a treegrid.

I have a column in a treegrid which is a math calculation like this : ed[=(c9+c10+c11)/c1*1000]]

The problem is that sometime C1 = 0 so i have Infini.ty or N.aN in the cells.

I would like to have a “-” instead.

So I tried to do this :

mygrid.attachEvent(“onXLE”,function(id) {


if ((mygrid.cells(id,12).cell.innerHTML==‘Infini.ty’) || (mygrid.cells(id,12).cell.innerHTML==‘N.aN’))


if ((mygrid.cells(id,13).cell.innerHTML==‘Infini.ty’) || (mygrid.cells(id,12).cell.innerHTML==‘N.aN’))




The problem is that when a row is inside a parent row, onXLE event is executed before the calculation.

How could I do ? the best way (maybe) would be to find an event after all calculation in the treegrid

Any idea?

Best regards,


You can use “onCellChanged” event:

if ((newValue==“N.aN”)||(newValue==“Infini.ty”))

Thank you very much  ! It works great :slight_smile: