S
SA
My listview has 3 columns i.e. name, populaiton, and country code in order.
I use following code to insert data into listview and I find that I can't
assign which subitem related to related field. e.g. assign population to
column2. In vb 6, I can do it by "subitems(i). How about in .net? thx.
i = 0
While MyDataAdapter.Read
ListView1.Items.Add("")
ListView1.Items(i).Text = CStr(MyDataAdapter("name"))
ListView1.Items(i).SubItems.Add(MyDataAdapter("population"))
ListView1.Items(i).SubItems.Add(MyDataAdapter("CountryCode"))
i = i + 1
End While
I use following code to insert data into listview and I find that I can't
assign which subitem related to related field. e.g. assign population to
column2. In vb 6, I can do it by "subitems(i). How about in .net? thx.
i = 0
While MyDataAdapter.Read
ListView1.Items.Add("")
ListView1.Items(i).Text = CStr(MyDataAdapter("name"))
ListView1.Items(i).SubItems.Add(MyDataAdapter("population"))
ListView1.Items(i).SubItems.Add(MyDataAdapter("CountryCode"))
i = i + 1
End While