Hi
When AutoCreateColumns & AutoRemoveColumns are both set to false, the grid should not make any changes to the settings in grid.Columns nor add or remove any column. Are you using the latest version of the component? Are you referring here to an issue at designtime or runtime? When at runtime and the problem persists, please provide some sample source app with which we can reproduce this issue here.
In AQTrans no fields have been defined.
When clicking button2 dataset refreshes and is viewed in grid but now "Timestamp", "Type", "Data" -columns are missing.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AQTrans->Close();
AQTrans->SQL->Clear();
AQTrans->SQL->Add("SELECT TOP 100000");
AQTrans->SQL->Add(" [Index]");
AQTrans->SQL->Add(" ,[InsertTime]");
AQTrans->SQL->Add(" ,[Timestamp]");
AQTrans->SQL->Add(" ,[Type]");
AQTrans->SQL->Add(" ,[Data]");
AQTrans->SQL->Add(" ,[Volume]");
AQTrans->SQL->Add(" ,[Amount]");
AQTrans->SQL->Add("FROM [Transaction]");
AQTrans->Open();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
AQTrans->Close();
AQTrans->SQL->Clear();
AQTrans->SQL->Add("SELECT TOP 100000");
AQTrans->SQL->Add(" [Index]");
AQTrans->SQL->Add(" ,[InsertTime]");
AQTrans->SQL->Add(" ,[Volume]");
AQTrans->SQL->Add(" ,[Amount]");
AQTrans->SQL->Add("FROM [Transaction]");
AQTrans->Open();
}
//---------------------------------------------------------------------------
This looks logical to me as in your 2nd dataset there are no fields TimeStamp, Type, Data, so , your columns would still refer to unexisting fields in the 2nd dataset, hence display no data.
It's not that they are missing data, it is that the columns are completely missing from the tdbadvgrid columns collection. I agree that empty fields would be a logical result, and that would be what I was hoping for as this is what happens in the regular tdbgrid, but this is not what happens in tdbavdgrid.
If you check the columns collection you should see that it looses the columns completely.
I'd like to show a complete application source with the settings from design time also, I am just not sure how to upload it.
We have traced & solved this issue. Next update of TDBAdvGrid will address this.
Thank you :)
Thats great news.