This is my first post in the vb.net forums, so HI everyone!
I currently have a vb windows application. In one form I have a listbox that on Form_Load displays a particular field from a database table. Upon clicking on any item in the listbox, it will populate nearby labels with further info about the selected item.
On the same page is an option to add an additional item, modify existing items and delete existing items, which I am able to do successfully by calling respective sql stored procedures.
My problem is that I can't find a way to refresh the listbox after any item has been modified, added or deleted. You can imagine the confusion that arises when a user selects an item, chooses to delete it, it pops up a message stating that the item has been deleted....but it still shows in the listbox! the only way for a user to notice any change is to close the form and re-open it, and I was hoping that there was a simpler way whilst still having that form open. I tried: ListBox1.Refresh() but I dont think that method is intended for what I want it to do.
Your help is greatly appreciated. Much Thanx!
Regards
Shalan99
I currently have a vb windows application. In one form I have a listbox that on Form_Load displays a particular field from a database table. Upon clicking on any item in the listbox, it will populate nearby labels with further info about the selected item.
On the same page is an option to add an additional item, modify existing items and delete existing items, which I am able to do successfully by calling respective sql stored procedures.
My problem is that I can't find a way to refresh the listbox after any item has been modified, added or deleted. You can imagine the confusion that arises when a user selects an item, chooses to delete it, it pops up a message stating that the item has been deleted....but it still shows in the listbox! the only way for a user to notice any change is to close the form and re-open it, and I was hoping that there was a simpler way whilst still having that form open. I tried: ListBox1.Refresh() but I dont think that method is intended for what I want it to do.
Your help is greatly appreciated. Much Thanx!
Regards
Shalan99