TFakeDBGrid = class(TDBGrid)
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
TFakeDBGrid(DBGrid1).FixedCols := TFakeDBGrid(DBGrid1).FixedCols + 1;
end;
// Note: 字段‘姓名’must be the first column in the grid
// and once you scroll the grid, the caption of the fixed column
// will become blank. I'll discuss how to solve this problem on
// 12,21