Problem when I delete a row of a grid

I have a trouble.



-I edit the ID to a row of a grid:



//Previously: v.gridPrincipal.g.cells(idRowChecked,1).value == ‘AA1’



v.gridPrincipal.g.cells(idRowChecked,1).setValue(fop.id);



//fop.id=‘AA2’

//I am not sure, but I suppose that: v.gridPrincipal.g.cells(idRowChecked,1).value == ‘AA2’



v.gridPrincipal.g.cells(idRowChecked,2).setValue(fop.name);



-And I see the changes, I see AA2 instead of AA1;



-But I press my Delete button and then:



var index = AA2;

v.gridPrincipal.g.deleteRow(index);



-I have a error, the index with value “AA2” doesnt exist!    



**************

-I see with firebug in:



property of grid: “rowsar”, it appareantly contains all the rows of the grid; but I see ‘AA1’ instead of ‘AA2’; and in the grid I see ‘AA1’.



-Please give me any suggestion. TX.



Varasabhanaman

O.S.P

The id of row and value of cell is two different entities.
With your code
      v.gridPrincipal.g.cells(idRowChecked,1).setValue(fop.id);

you are changing value of cell, but the ID or row is not changed
Id can be changed as
    grid.changeRowId(“AA1”,“AA2”)