dmitrybv 3 Posted August 1 Hello. When installing RAD Studio, the ListCollectionsSampleProject.dpr project is added to the C:\Users\Public\Documents\Embarcadero\Studio\23.0\Samples\Object Pascal\Multi-Device Samples\User Interface\ListCollections folder, which shows how to create and link collections to control TListBox. How to correctly add the TBindNavigator component to the Form in this project so that you can use it to move through the list from the TListBox? The TBindNavigator control has a DataSource property of type TBaseLinkingBindSource. But the Form does not have a component that would inherit from TBaseLinkingBindSource. So TBindNavigator.DataSource cannot be assigned anything. Although TListBox is supposed to communicate with data through a descendant of TBaseLinkingBindSource, the project uses the TBindList component. But it cannot be assigned to the TBindNavigator.DataSource property. Share this post Link to post
Vincent Gsell 11 Posted August 9 (edited) Hi, Not sure I understand well, because this demo is, on my side (D12), a demo of Expression parser for live binding... In fact, perhaps is is not really the subject, but if the problem is to link a dataset to a TListBox, I tryed just a week ago, and it was not very clear firstly, but now, I can do it quickly : Hope this will help you ? - Drop your TListBox - Drop your TClientDataSet (push a field or 2 inside) -> CreateDatSet - Drop your TDataSource (but it's not a mandatory) - In liveBinding, the "secret" is to link the 2 "Synch" parts : The one of the TClientDataSet with the one of the list. - then, link desired Field from TClientDataSet into TListBox.Items.Text Normally, you'll got a prompt that indicate it will create for you a TBindSourceDB and a BindingList with TLinkListControlToField. Once this done, run and add record in your TClientDataSet, and it should appear in TListBox. Hope this help, Vincent - Above, my test app, starting only with Dataset and client DataSet, and a TPrototypeBindSource which is a more direct way (and fun) to display information. Edited August 9 by Vincent Gsell Share this post Link to post