There are some possibilities:
'Create empty subitems and fill them
Dim i As ListViewItem = ListView1.Items.Add("Test")
i.SubItems.Add(String.Empty)
i.SubItems.Add(String.Empty)
i.SubItems.Add(String.Empty)
i.SubItems(3).Text = "3"
i.SubItems(2).Text = "2"
i.SubItems(1).Text = "1"
'Use temp. variables
Dim j As ListViewItem = ListView1.Items.Add("Test")
Dim a, b, c As String
a = "1"
b = "2"
c = "3"
j.SubItems.AddRange(New String() {c, b, a})
--
Greetz,
Jan
__________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Able" <ab**@epost.no> schreef in bericht
news:xH*****************@news4.e.nsc.no...
Dear friends
Items is added like this
Dim itmx As New ListViewItem
itmx = ListView1.Items.Add("Title", 0)
itmx.SubItems.Add("1")
itmx.SubItems.Add("2")
itmx.SubItems.Add("3")
The item "2" is added in row one in second column and "3" is added in row
one in third column. But is it possible to add item "2" in row one in
third column and add "3" in row one in second column without rearranging the
sequence in designtime. In other words is it possibly to programaticly
determine the column?
Regards Able