Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TAdvStringGrid
How to control that at specific column positions, no column can be dropped.

With the OnAllowColumnDrop event, it is possible to control that at specific column positions, no column can be dropped.

Example:
With a TAdvGridColumnPicker connected to a grid and the code:

procedure TForm1.AdvGridColumnPicker1AllowColumnDrag(Sender: TObject;
  ACol: Integer; var Allow: Boolean);
begin
  Allow := ACol > 2;

end;

procedure TForm1.AdvGridColumnPicker1AllowColumnDrop(Sender: TObject;
  ACol: Integer; var Allow: Boolean);
begin
  Allow := ACol > 2;
end;
the first 2 normal columns cannot participate in the drag & drop to a column picker, effectively making just these 2 normal columns locked.