|
-
Jan 14th, 2008, 02:55 AM
#1
Thread Starter
PowerPoster
[1.0/1.1] Adding items to Columns
Hi all,
I've created two columns on the list view as follows.
Code:
ColumnHeader colHed;
// Header one
colHed = new ColumnHeader();
colHed.Text = "Name";
colHed.Width = 100;
this.lwDetails.Columns.Add(colHed);
// Header two
colHed = new ColumnHeader();
colHed.Text = "Address";
colHed.Width = 200;
this.lwDetails.Columns.Add(colHed);
Then on a separate function I try to add data to those columns. Name and address of a one person store in a string array named items. I try to add data as follows.
Code:
this.lwDetails.Items.Add(items[0]);
this.lwDetails.Items.Add(items[1]);
lwDetails is my list view. In this case name and address are added to the same column. How can I correct it.
Thanks,
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|