CheckedListBox to ListView
I have these codes which when selected items in listbox it display files in CheckedListBox ...
service
vb.net Code:
Private Sub _service_GetReleaseSodaCompleted(ByVal sender As Object, ByVal e As GetReleaseSodaCompletedEventArgs)
Dim flag As Boolean = Not e.Cancelled
If Not flag Then
Else
flag = Not InvokeRequired
If Not flag Then
Dim objArr As Object() = New Object() {sender, e}
Invoke(New GetReleaseSodaCompletedEventHandler(AddressOf _service_GetReleaseSodaCompleted), objArr)
Else
flag = e.[Error] Is Nothing
If Not flag Then
Dim myDateTime As DateTime = DateTime.Now
Else
CheckedListBox1.BeginUpdate()
CheckedListBox1.Items.AddRange(e.Result)
CheckedListBox1.EndUpdate()
End If
End If
End If
End Sub
ListBox1_SelectedIndexChanged
vb.net Code:
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
CheckedListBox1.BeginUpdate()
CheckedListBox1.Items.Clear()
Dim flag As Boolean = ListBox1.SelectedItem Is Nothing
If Not flag Then
CheckedListBox1.Items.AddRange(DirectCast(ListBox1.SelectedItem, [Soda]).files)
End If
CheckedListBox1.EndUpdate()
End Sub
how can I use ListView instead of CheckedListBox ..so that in ListView I may able to show file name as well as file size
In ListBox .. this peace of code shows only file name ... how can I declare file size so that I can get file name and file size in ListView
Code:
CheckedListBox1.Items.AddRange(DirectCast(ListBox1.SelectedItem, [Soda]).files)
Re: CheckedListBox to ListView
Are you asking how to use a Listview control so you can display more information?
Re: CheckedListBox to ListView
Quote:
Originally Posted by
DavesChillaxin
Are you asking how to use a Listview control so you can display more information?
yes, Obviously !
Re: CheckedListBox to ListView
Sorry! by mistake I made thread title different whereas it is how to use ListView instead of CheckedListBox..