C
Co
Hi All,
I have a Listview with filenames. When I click the edit menu the form
to edit data is opened.
When I change the file and close the form I want to rebuild the
listview holding the data so the changes are seen
at once, my code doesn't do that:
Private Sub CMenuClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.ToolStripItemClickedEventArgs)
Dim MyForm As New frmEdit
'Point to menu item clicked
Select Case e.ClickedItem.Text
Case "Open" : System.Diagnostics.Process.Start
(sDocumentName)
Case "Edit"
Dim I As Integer
For I = 0 To ListView.SelectedItems.Count - 1
MyForm.MyPropertyMydata = ListView.SelectedItems
(I).Tag
Next
MyForm.Show()
'now we have to clear and rebuild the items in the
Listview
Dim node = TreeView.SelectedNode
Dim nodeID = node.row("ID")
LoadListView(nodeID)
Case "Delete" : MsgBox("Delete")
End Select
End Sub
Regards
Marco
The Netherlands
I have a Listview with filenames. When I click the edit menu the form
to edit data is opened.
When I change the file and close the form I want to rebuild the
listview holding the data so the changes are seen
at once, my code doesn't do that:
Private Sub CMenuClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.ToolStripItemClickedEventArgs)
Dim MyForm As New frmEdit
'Point to menu item clicked
Select Case e.ClickedItem.Text
Case "Open" : System.Diagnostics.Process.Start
(sDocumentName)
Case "Edit"
Dim I As Integer
For I = 0 To ListView.SelectedItems.Count - 1
MyForm.MyPropertyMydata = ListView.SelectedItems
(I).Tag
Next
MyForm.Show()
'now we have to clear and rebuild the items in the
Listview
Dim node = TreeView.SelectedNode
Dim nodeID = node.row("ID")
LoadListView(nodeID)
Case "Delete" : MsgBox("Delete")
End Select
End Sub
Regards
Marco
The Netherlands