When I coding the windows application, I can add the values into listview, same as
ListView1.items.Add("test")
but it can not work in PPC application, how can I code it in cf 1.1 ?
Printable View
When I coding the windows application, I can add the values into listview, same as
ListView1.items.Add("test")
but it can not work in PPC application, how can I code it in cf 1.1 ?
With the ListView in order to add items to it you need to create a listviewitem then you add the listviewitem to the listview
EG:
Dim lvi As New ListViewItem("test")
listview1.items.add(lvi)
Thanks...
I know the ListViewItem support array input, why the program only show "go"?
Dim d(3) As String
d(0) = "go"
d(1) = "to"
d(2) = "you"
Dim lvi As New ListViewItem(d)
ListView1.Items.Add(lvi)
You need to add subitems to the listviewitem
here is an example
l_dr is just a datareader im using
Dim l_lvi As New ListViewItem(l_dr.Item("ID").ToString)
l_lvi.SubItems.Add(l_dr.Item("RouteNo").ToString)
l_lvi.SubItems.Add(l_dr.Item("CompCode").ToString)
l_lvi.SubItems.Add(Date.Parse(l_dr.Item("DateInit")).ToShortDateString)
Thanks, It work...
and do you know how to control the listview items.
such as when I press the listview item, I call the event..
you will do that in the listview click event or else even the itemactivate event
Quote:
Originally Posted by Strider
Thanks,
but when I use Itemactivate event, how can I call I selected item value?
Quote:
Private Sub ListView1_ItemActivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.ItemActivate
MsgBox(ListView1.Text)
End Sub