update index of grid row.