0

I am looking for the a simplest for of code where I can add some items to a listview.

i have 4 text boxes and 4 columns in a listview..

what could be the code to put 4 values as a single row in list view..
i managed to put put first textbox value as listviewitem (the first column) , but rest 3 has to be added as subitems... i am stuck here..

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Reverend Jim
1

That's exactly how it is done. The items are added as follows:

item = New ListViewItem          'create new listview item

item.Text = col1text             'add column 1
item.SubItems.Add(col2text)      'add column 2
item.SubItems.Add(col2text)      'add column 3

listView.Items.Add(item)         'add item to listview
0

No prob. I find a simple example that illustrates one feature is clearer than a complex one that tries to show all features. Are you listening Microsoft????

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.