queryRowMove(table: Table; r: Integer; rto: Integer): Boolean;
The queryRowMove event of the Table control occurs when the user releases the mouse after dragging a fixed row to a new position when the allowDrag property is set to true.
The parameter values are listed in the following table.
Parameter | Description |
---|---|
table | The table in which the row is to be moved |
r | The row that is to be moved |
rto | The row before which the dragged row is inserted |
The row is moved to the position to which it was dragged when this event method is not defined or if this event method is defined and it returns a value of true.
The move of the row is aborted when this event method is defined and it returns false.
The method in the following example shows the use of the queryRowMove event method.
queryRowMove(table: Table; r: Integer; rto: Integer): Boolean; begin if r <= 2 or rto <= 2 then return false; // don’t let them move the first two rows endif; return true; end;