queryColumnMove
queryColumnMove(table: Table; c: Integer; cto: Integer): Boolean;
The queryColumnMove event of the Table control is called when the user releases the mouse after dragging a fixed column 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 column is to be moved |
c | The column that is to be moved |
cto | The column before which the dragged column is inserted |
The column 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 column is aborted when this event method is defined and it returns false.
The method in the following example shows the use of the queryColumnMove event method.
queryColumnMove(table: Table; c: Integer; cto: Integer): Boolean; begin if c <= 2 or cto <= 2 then return false; // don’t let them move the first two columns endif; return true; end;