Dbgrid Delphi Seattle

Asked

Viewed 860 times

1

I installed a trial of Delphi Seattle and compiled my system, but I realized that when opening a certain query the column does not get the size I determined earlier. When compiling in Delphi 7 the columns are the correct size.

Someone else is going through this trouble? inserir a descrição da imagem aqui

  • As far as I know from my experience the XE7, it will adjust to the content, and as there is nothing it leaves in a standard size. To force his size I can’t remember if there’s any configuration for it. Sure, you can always unleash that glorious everyday gambit and set the width in the arm after opening the Dataset, but it is not something to recommend for obvious reasons.

  • I found in the forum or was an article on the board of a dbgrid column adjustment process, until it works cool, but for a grid that has a lot of information is not cool.

2 answers

4


This is a BUG that affects only the first column of Dbgrid and Stringgrid. It has been fixed in RAD Studio 10 Seattle Update 1.

More details on the link below:

RSP-11797 - VCL Tstringgrid.Colwidths is Broken

You can fix this at runtime using the Afteropen event from your table, example:

    procedure TForm1.ClientDataSet1AfterOpen(DataSet: TDataSet);
    begin
      DBGrid1.Columns[0].Width := 200;
    end;

Eduardo Belo

  • I created a new application with 2 fields in dbgrid , I used his tip he adjusts the first column of the size that is placed and the others are getting the size that was to be. I’ll test on some grids from my system and check.. Thanks.

-1

  • 1

    G.Molina, remember that this forum is in Portuguese and the questions, answers and comments should be in Portuguese.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.