The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



RemoveRows


Unit: SDL_datatable
Class: TDataTable
Declaration: function RemoveRows (FirstRow, LastRow: integer): integer;

The method RemoveRows deletes all rows in the range from FirstRow to LastRow. The method RemoveRows triggers the OnChangeSetup event.

The function returns the number of deleted rows if everything is OK or -1 if the FirstRow or the LastRow parameter is out of range.

Hint: Setting both FirstRow and LastRow to zero values is a shortcut for setting FirstRow=1 and LastRow=NrOfRows, i.e. the entire data table is scanned for matching cells if both parameters are set to zero.



Last Update: 2023-Dec-14