this.cells(rId,i).getValue() is undefined

Hello,
While ‘onEditCell’ event, I get this error message in FireBug
“TypeError: this.cells(rId, i) is undefined”

[code]// ( … )
mygrid.attachEvent(“onEditCell”, myUpdatefunc);

function myUpdatefunc(stage, rId,cInd) {
if (stage && stage == 2) {
var updatedCells = new Array();
for (var i=0; i< this.getColumnCount(); i++)
{
updatedCells[i] = this.cells(rId,i).getValue();
}
var1 = updatedCells[0];
var2 = updatedCells[1]; // etc…
} else { alert(‘error’) };
};
// (… )[/code]

Can someone explain me why ?

Regards

Unfortunately the issue cannot be reconstructed with the provided code.
Please, provide a more detailed sample of your code.

Sorry.

Here is the JS part

[code]function doOnLoad(){

var mainLayout= new dhtmlXLayoutObject(winVP, ‘1E’);

myGrid = myLayout.attachGrid();
myGrid.setImagePath("../includes/js/dx/imgs/");
myGrid.setHeader("col0 col1, col2, col3, col4, col5, col6, col7,col8");
myGrid.setInitWidths("20,80,*,50,70, 50, 70, 90, 50");
myGrid.setColAlign("center,left,left, center, right, right,right,right");
myGrid.setColTypes("ro,ro,ed,ed,edn,edn,ron[=c4-(c4*c5/100)],ron[=c3*(c4-(c4*c5/100))]");
myGrid.setNumberFormat("0,000.00 €",4,","," ");
myGrid.setNumberFormat("0,000.00 %",5,","," ");
myGrid.setNumberFormat("0,000.00 €",6,","," ");
myGrid.setNumberFormat("0,000.00 €",7,","," ");
myGrid.enableSmartRendering(true);
myGrid.enableMultiselect(true);
myGrid.setColumnHidden(8, true);

myGrid.attachEvent("onEditCell", myUpdatefunc);
myGrid.load("class/myfile.php?action=reload", calculate, "xml");
myGrid.init();

   function myUpdatefunc(stage, rId,cInd) {
        if (stage && stage == 2) {
        var updatedCells =  new Array();
        for (var i=0; i< this.getColumnCount(); i++)
           {
              updatedCells[i] = this.cells(rId,i).getValue();
           }
             var1 =  updatedCells[0];
             var2 =  updatedCells[1]; // etc...
       } else { alert('error') };
     alert('cells values are 'var1+' and '+var2); // here nothing happens
    };

} // end of doOnLoad[/code]

OK Found it I think,
It looks like my columns don’t match.

This one have 9 columns
myGrid.setHeader(“col0 col1, col2, col3, col4, col5, col6, col7,col8”);

This one have 8 columns.
myGrid.setColTypes(“ro,ro,ed,ed,edn,edn,ron[=c4-(c4c5/100)],ron[=c3(c4-(c4*c5/100))]”);

The last one is hidden.

Sorry

This may occur the issue.
The number of columns in all config methods should be equal to the number of columns in setHeader() method.