01-31-2012, 03:32 AM
I seem to have come across a puzzler!
If I want to delete (multi-)selected rows from a grid, I first find out the selected rows using RowsSelectedGet and then loop then run through the array with a for-counter-loop of RowDelete delete statements for each element in the array that RowsSelectedGet filled.
BUT each time I delete a row, the row count changes!
Is there a way to delete all rows at once or do I have to put in an accounting factor for the row deletion into each turn of the for-counter-loop e.g. subtract the counter integer from the row number?
S
If I want to delete (multi-)selected rows from a grid, I first find out the selected rows using RowsSelectedGet and then loop then run through the array with a for-counter-loop of RowDelete delete statements for each element in the array that RowsSelectedGet filled.
BUT each time I delete a row, the row count changes!
Is there a way to delete all rows at once or do I have to put in an accounting factor for the row deletion into each turn of the for-counter-loop e.g. subtract the counter integer from the row number?
S