While deleting a row from a normal grid, how do I get the index of the deleted r

While deleting a row from a normal grid, how do I get the index of the deleted row?...

OriginalPostID-93494

OriginalPostID-93494

  Discussion posts and replies are publicly visible

Parents
  • If you've deleted the 2 rows (i.e. row1 &3), your data is no longer 4 but 2. So next time you take an action, you are interested in just the remaining 2, right? You may want to check your delete logic.
    On the other hand, if you're looking for just a running sequence where each number represents a row in a fixed fashion, then again, the same logic would work where-by you enumerate only once on the size of the array and persist (or map) the value against the rows. When you delete row 1 & 3, this array will be made of row 2 and 4 which will be mapped to the corresponding two elements in the grid. Both the approaches should work on the same basis.

Reply
  • If you've deleted the 2 rows (i.e. row1 &3), your data is no longer 4 but 2. So next time you take an action, you are interested in just the remaining 2, right? You may want to check your delete logic.
    On the other hand, if you're looking for just a running sequence where each number represents a row in a fixed fashion, then again, the same logic would work where-by you enumerate only once on the size of the array and persist (or map) the value against the rows. When you delete row 1 & 3, this array will be made of row 2 and 4 which will be mapped to the corresponding two elements in the grid. Both the approaches should work on the same basis.

Children
No Data