Well, i solved the problem.
I'll post the solution here for anyone having the same problem. When you activate drag and drop on the grid, there are some options that manage the way the grid will give id's for rows. Theses options are autoid and autoidprefix. The solution is to turn off the autoid option by passing as argument the name of a function that will return the id of the row (autoid: myFunction). The problem is that the only parameters that you'll have on this function are the colums that you have on your grid. That is, you'll have to put the id of the row as a column of the grid too in order to keep the same id of the row on the second (or third…) grid.
I hope this could help somebody.