...allow column resize in a TDBGrid but prevent move?

Author: Thomas Stutz

Category: VCL

Problem: How to allow column resize in a TDBGrid but prevent move ?
Unlike the TStringGrid, the TDBGrid has no goColMoving
Property published.
So here's a workaround for it:

TStringGrid(DBGrid1).Options:= TStringGrid(DBGrid1).Options-[goColMoving];

{***}

Problem: Das TDBGrid hat keine Eigenschaft goColMoving - wie das TStringGrid -
um zu verhindern, dass Spalten verschoben werden könnnen.
(Wobei Spalten vergrössern erlaubt sein soll)
So geht es trotzdem:

TStringGrid(DBGrid1).Options:= TStringGrid(DBGrid1).Options-[goColMoving];

 

printed from
www.swissdelphicenter.ch
developers knowledge base