A
Alessandro
I have a big problem with ListView: if i add subitmes them they are null...
Here the code to populate the listview:
For i = 0 To Total - 1
Dim oListViewItem As ListViewItem
Dim oField As New CMPC_Fields
oListViewItem = New ListViewItem
oListViewItem.Checked = oField.Visible
oListViewItem.Text = "test _" & i
oListViewItem.SubItems.Add(oField.FLDS_ID.ToString)
oListViewItem.SubItems.Add(oField.Order.ToString)
oListViewItem.SubItems.Add(oField.Removable.ToString)
Me.LSVfields.Items.Add(oListViewItem)
Next
if then i do:
Me.LSVfields.Items(0).count --> i have to correct number of subitmes;
LSVfields.Items(0).SubItems(0) --> i have the correct text: test_0
LSVfields.Items(0).SubItems(1) --> i have nothing
LSVfields.Items(0).SubItems(2) --> i have nothing
LSVfields.Items(0).SubItems(3) --> i have nothing
i don't understand why !
Here the code to populate the listview:
For i = 0 To Total - 1
Dim oListViewItem As ListViewItem
Dim oField As New CMPC_Fields
oListViewItem = New ListViewItem
oListViewItem.Checked = oField.Visible
oListViewItem.Text = "test _" & i
oListViewItem.SubItems.Add(oField.FLDS_ID.ToString)
oListViewItem.SubItems.Add(oField.Order.ToString)
oListViewItem.SubItems.Add(oField.Removable.ToString)
Me.LSVfields.Items.Add(oListViewItem)
Next
if then i do:
Me.LSVfields.Items(0).count --> i have to correct number of subitmes;
LSVfields.Items(0).SubItems(0) --> i have the correct text: test_0
LSVfields.Items(0).SubItems(1) --> i have nothing
LSVfields.Items(0).SubItems(2) --> i have nothing
LSVfields.Items(0).SubItems(3) --> i have nothing
i don't understand why !