grid row

i m using 1.4 version if it has error please send the later version





when i insert the value through grid then this code is O.K



BUT at the time of the updation this code give the error



like _childindex is null or not and object when i use the code



mygrid.cellByIndex(i,0).setValue(myvalue);



then object is not suppored



if(counter<=0)

{



var rowid=mygrid.getRowIndex(mygrid.getSelectedId());

alert(‘row id=’+rowid);

// alert(mygrid.rowsCol.length);

// var myvalue=mygrid.cells(4,5).getValue();

var myvalue=mygrid.cells(mygrid.getSelectedId(),5).getValue();

alert(‘myvlue…’+mygrid.getRowsNum());



for(var i=rowid+1;i<mygrid.rowsCol.length;i++)

{

alert(‘inside’);

//mygrid.cells(mygrid.getRowId(i),5).setValue((mygrid.getSelectedRowId(),5).getValue());

mygrid.cells(i+1,5).setValue(myvalue);

mygrid.cells(i+1,6).setValue(’’);

mygrid.cells(i+1,7).setValue(’’);



}

counter=counter+1;



}

like _childindex is null or not and object when i use the code
Such error occurs when you are using command with non-existing rowID or rowIndex ( your case )


There are two command in grids
grid.cells(rowId, cellIndex)
grid.cells2(rowIndex, cellIndex)

according to your code you are using rowIndex ( var rowid=mygrid.getRowIndex ) but using grid.cells, which require rowID as incoming parameter.