Mega Code Archive

 
Categories / Delphi / VCL
 

Seting the number of fixed columns in a tdbgrid

Question: Is there any way to set the number of fixed columns in a TDbGrid? Answer: The following example demonstrates casting a TDbGrid component to a TStringGrid component to surface the FixedCols property. Example: procedure TForm1.Button1Click(Sender: TObject); begin TStringGrid(DbGrid1).FixedCols := 2; end;