listview issue
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..
bilal_fazlani
Junior Poster in Training
55 posts since Oct 2011
Reputation Points: 10
Solved Threads: 3
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
Reverend Jim
Posting Shark
1,169 posts since Aug 2010
Reputation Points: 253
Solved Threads: 159
bilal_fazlani
Junior Poster in Training
55 posts since Oct 2011
Reputation Points: 10
Solved Threads: 3
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????
Reverend Jim
Posting Shark
1,169 posts since Aug 2010
Reputation Points: 253
Solved Threads: 159