[ SpizaGenije @ 24.09.2014. 18:12 ] @
Elem, guglao po forumima i nisam našao rešenje... 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 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'. |