简体   繁体   中英

TDBGrid - Synchronisation or display problem

I am facing a very strange problem in one of my programs. I have a TSQLConnection followed by two TSQLQUery , TDataSetProvider , TClientDataSet and TDataSource . Its a Master-Detail structure.

The TDataSource of the detail query has an additional column with one lookup property of the master query. (Think of something like 'ProductID, ProductName, GroupName' where GroupName comes from the master query)

Then I have a DBGrid which has the TDataSource of the detail query as Source. It diplays most parts correctly, but the field that is a lookup from the master-query, sometimes does not show. Sometimes means in this case, i scroll down in the DBGrid, and up again, then its gone. I scroll down and up one more time, and its shown.

For debugging I added a TDBLookupComboBox with the same source as the DBGrid, but the ComboBox always shows the correct value for this field.

Thanks for any help on this problem.

尝试将lookup列的LookupCash属性更改为true ,我认为这将解决问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM