Mega Code Archive
Allow column resize in a TDBGrid but prevent move
Title: allow column resize in a TDBGrid but prevent move?
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];