What you're doing can work just in one case, when the layout does sort the rows using the same ordering of the database table. Are you sure that will always be the case ? That said, it could work... but I would strongly advice against that. I do not understand why you cannot use the RowId.