Prevent column moves in a DBGrid  

Send By: Radikal (Q3 Team)
Web :
Date: 26/12/99

Tip accessed 683 times


To impede that they move of place the columns in a DBGrid, simply put Options.dgColumnResice to FALSE
The problem is that we also impede that redimensionen the columns.

To impede that they move them, but leaving that they can them redimensionar, put this code in the event OnColumnMoved of your DBGrid:

 procedure TForm1.DBGrid1ColumnMoved(Sender: TObject; FromIndex,
   ToIndex: Integer);
   With (Sender as TDbGrid).Columns do