stevecking
Active member
- Joined
- Dec 27, 2006
- Messages
- 32
- Programming Experience
- 5-10
I'm building an application which uses a main form with a listview control. The listview control displays information concerning each record loaded for that Part Number. Adding a record causes a popup form to be displayed. After the user enters the record data and saves the record, I want the listview on the main form to be updated with the information. When the record information is originally loaded I use a reader object and add ListViewItems to the listview. This works very well but when I attempt to add a new ListViewItem from the popup form, effectively appending record data to the listview, it is not displayed even though I get no errors. Previously I attempted to trigger the load procedure remotely and again got no errors but no displayed data. How could I update the listview remotely and have it display the new data? Thanks in advance for your help.
VB.NET:
Try
If FormIsOpen("frmPpr") Then
Dim ListItem = New ListViewItem(PprNbr)
ListItem.SubItems.Add(PN)
ListItem.Tag = ID
ListItem.SubItems.Add(PprNbr)
frmPpr.pprListView.Items.Add(ListItem)
frmPpr.pprListView.Refresh()
End If
Catch ex As Exception
Message.AppMessageBox(ex.Message, "frmPprAdd_AppendPprItem")
End Try
Last edited by a moderator: