refrest the windows application form
-
Hello friends in my windows form , there is a listbox which gets filled on the form load event. on the button click event, the item selected in the listbox is deleted from the database and message box appears telling that the this item has been removed from the database the problem is that I want that after the messagebox is closed, the list box should be refreshed now holding the items that are now currently in the databse and the item I have just deleted should not appear in the listbox. How will I achieve this? Looking forward for ur kind suggestions on the problem. Thanks
Sadaf
-
Hello friends in my windows form , there is a listbox which gets filled on the form load event. on the button click event, the item selected in the listbox is deleted from the database and message box appears telling that the this item has been removed from the database the problem is that I want that after the messagebox is closed, the list box should be refreshed now holding the items that are now currently in the databse and the item I have just deleted should not appear in the listbox. How will I achieve this? Looking forward for ur kind suggestions on the problem. Thanks
Sadaf
Clear the contents of the listbox and fill it again. You can also just remove the item you have just deleted but in that case listbox won't contain any items that have been added after your programs startup and will contain items that have been deleted by other users.
Giorgi Dalakishvili #region signature my articles #endregion
-
Hello friends in my windows form , there is a listbox which gets filled on the form load event. on the button click event, the item selected in the listbox is deleted from the database and message box appears telling that the this item has been removed from the database the problem is that I want that after the messagebox is closed, the list box should be refreshed now holding the items that are now currently in the databse and the item I have just deleted should not appear in the listbox. How will I achieve this? Looking forward for ur kind suggestions on the problem. Thanks
Sadaf