Im trying to edit an item in a listview. I can edit the item ok but i want to execute code to rename the directory after the edit. The code executes before the edit is completed ?
Is there a way to wait until the name has been change first?
heres my code
Private Sub ListView1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick 'sub to update directory name if user chooses to edit movie title Try 'allow editing on listview ListView1.SelectedItems(0).BeginEdit() Catch ex As Exception End Try 'get index value of selected item Dim index = ListView1.Items.Item(ListView1.SelectedIndices(0)).Index 'get the old file path Dim oldPath = directorylist(index) 'create new path / working on this 'Dim newPath As String() = oldPath.ToString.Split("\") 'rename the directory with the newly edited label 'FileIO.FileSystem.RenameDirectory(oldPath, newPath) End Sub
This post has been edited by deery5000: 04 December 2011 - 07:39 AM