DavieDave
DavieDave

Reputation: 1414

DBLookupComboBox and Refreshing of Contents

I have Delphi 7 and I'm using NexusDB for the database.

I have a main form where I have a DBLookupComboBox to list the contents of a Table.

If I press a button I have on the form to add a new item to the list (which opens a 2nd dialog box) and then come back to the main form I want the newly added item to show up immediately

I can't seem to get that to work.

I've tried refreshing the DataSet under the ListSource object.

Anyone have any ideas?

Thanks, David

Upvotes: 0

Views: 4005

Answers (1)

DavieDave
DavieDave

Reputation: 1414

DBLookupComboBox1.ListSource.DataSet.Close;
DBLookupComboBox1.ListSource.DataSet.Open;

Upvotes: 2

Related Questions