Elem, guglao po forumima i nisam našao rešenje...
Evo ga kôd:
A evo i kakvu mi grešku izbaci na "lvi = lst_vrstaArt1.SelectedItems(i)":
Evo ga kôd:
Code:
Dim lvi As New ListViewItem, lvi2 As New ListViewItem
If lst_vrstaArt1.SelectedItems.Count > 0 Then
For i As Integer = 0 To lst_vrstaArt1.SelectedItems.Count - 1
lvi = lst_vrstaArt1.SelectedItems(i)
lvi2 = CType(lvi.Clone, ListViewItem)
lst_vrstaArt2.Items.Add(lvi2)
Next
End If
Dim lvi As New ListViewItem, lvi2 As New ListViewItem
If lst_vrstaArt1.SelectedItems.Count > 0 Then
For i As Integer = 0 To lst_vrstaArt1.SelectedItems.Count - 1
lvi = lst_vrstaArt1.SelectedItems(i)
lvi2 = CType(lvi.Clone, ListViewItem)
lst_vrstaArt2.Items.Add(lvi2)
Next
End If
A evo i kakvu mi grešku izbaci na "lvi = lst_vrstaArt1.SelectedItems(i)":
Code:
An unhandled exception of type 'System.InvalidCastException' occurred in test.exe
Additional information: Unable to cast object of type 'System.String' to type 'System.Windows.Forms.ListViewItem'.
An unhandled exception of type 'System.InvalidCastException' occurred in test.exe
Additional information: Unable to cast object of type 'System.String' to type 'System.Windows.Forms.ListViewItem'.
Potpis
Some people, when confronted with a problem, think: "I know, I'll use regular expressions."
Now they have two problems!
-Jamie Zawinsky
Now they have two problems!
-Jamie Zawinsky