procedure TFrmColSelect.SaveGridLayOut;
var
  Ini: TIniFile;
begin
  if CheckBox1.Checked then
    Grid.SaveGridLayoutIni(ExtractFilePath(Application.ExeName) + '/Grid.ini',
      Owner.ClassName + '$' + Name, true)
  else
  begin
    Ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + '/Grid.ini');
    try
      Ini.EraseSection(Grid.Owner.ClassName + '$' + Grid.Name);
    finally
      Ini.Free;
    end;
  end;
end;


procedure RestoreGridLayOut(AGrid:TDBGridEh);
var
  RestoreParams:TDBGridEhRestoreParams;
begin
  RestoreParams:=[grpColIndexEh,grpColWidthsEh,grpSortMarkerEh,
    grpColVisibleEh,grpRowHeightEh];
  with AGrid do
    RestoreGridLayoutIni(ExtractFilePath(Application.ExeName) + '/Grid.ini',
      Owner.ClassName + '$' + Name,RestoreParams);
end;     

相关文章:

  • 2021-11-21
  • 2021-04-19
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案