0

Hi all,

I've created two columns on the list view as follows.

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.

this.lwDetails.Items.Add(items[0]);
			this.lwDetails.Items.Add(items[1]);

lwDetails is the list view. In this case name and address are added to the same column. How can I correct it.

Thanks..

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by eranga262154
0

Anyway, I solved it myself after doing some experimental. Just have to followed SubItems on the ListView.

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.