Select/Focus last item table

Hello, I’m trying to select the last row in a Table but after add the item #40 the doesn’t work. If the last row is selected, the next add item will select the first rown instead of the last, and backwards.

Thanks you!.

It would be useful to post some code in which the problem occurs.

I use this code tablePed.setValue(item.getId); after add the last row with these ID. I can’t identify the problem because it happen after 40 rows.

Best regards