Friday, April 27, 2012

Deleting rows quickly




Often you’ll have several rows to delete, and the most common way is to delete them in a loop like:
FOR ll_RowOn = 1 TO dw_1.RowCount()

 dw_1.DeleteRow(ll_RowOn)

NEXT

A quicker way (both typing and speed) is to just move the rows from the Primary! buffer to the Delete! buffer.  For example, to delete all the rows in the Primary! buffer:
dw_1.RowsMove(dw_1, 1, dw_1.RowCount, Primary!, dw_1, 1, Delete!)

Don’t forget that filtered rows are in a different buffer.

No comments:

Post a Comment