Dynamic fields: Cols missing

Dear TMS-Team,

we are using TMS-Grids (V.2.1.13.0)  with SimpleDataSets in our projects.
I've the following problem:

If I use dynamic generated sql, the grid component doesn't add new colums at runtime.
Example:
1) SELECT A, B FROM TBL -> Columns A, B are shown correctly!
2) SELECT A, B, C FROM TBL -> The new Colum C is missing after the Select!

I've tried the same with the original delphi grid. The original delphi grid adds the new colums without problems.

How can I fix this problem?

Did you set grid.AutoCreateColumns = true ?
Did you reactivate your dataset ?

Hi,
AutoCreateColumns = true ? -> Yes it is set to true
Did you reactivate your dataset ?
-> Yes.

We can't reproduce this here. Was retested with BDEDEMOS en Events database with a TQuery and the code


procedure TForm2.Button1Click(Sender: TObject);
begin
  query1.SQL.Text := 'SELECT VenueNo, EventNo from events';
  query1.Active := true;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
  query1.SQL.Text := 'SELECT VenueNo, EventNo, Event_Name from events';
  query1.Active := true;
end;

procedure TForm2.FormCreate(Sender: TObject);
begin
  dbadvgrid1.AutoCreateColumns := true;
  dbadvgrid1.AutoRemoveColumns := true;
end;

and this shows 2 and 3 columns respectively.
If a problem persists, please contact us by email with some sample source project with which we can reproduce thi s issue here.

I will try to make an example. Thanks.