ListBox refresh

I have a Window with a ListBox, some TextField and a ButtonInsert.
The ListBox show the row of a selct from a db
If i fill TextField and click ButtonInsert i update db with new row.
This work ok.
Now i would like to see the new row also in ListBox.
not work
Can you help me to make this?




The problem is that you haven’t implemented anything to add the row to the listbox, only the database.


Add (or Insert) what you typed in the TextFields either using these TextFields contents or Read the brand new Row from the Data Base.

Ask for more if these are not enough.

I understand that I need to manually update the listbox.
I make this in Action of the Button:
ListBox.AddRow(textfield1.Text, textfield2.text, textfield3.text, textfield4.text)
but not work

Ok, i solved.
i made new metod of the windows and move the population of the listbox in this metod instead of open event.
In action of the Button i call this metod.
what do you think?

Do that in the Method you used to populate the data base.

Use the code you have to display your records from your database to your listbox and start your code by listbox1.deleteallrows