Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListView control problem
Message
From
03/08/2005 16:38:32
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01038228
Message ID:
01038313
Views:
17
Einar,

I suspected that it had something to do with the way you were populating your ListView columns, and it turns out I was correct. But, why my way works and yours doesn't, I'm not 100% sure. Anyway, try it this way and you should see good results.
	for (int i = 0 ; i < 42 ; i++)
	{
		textItem = (i+1).ToString();
		textSub  = "Cycle " +(i+1).ToString().PadLeft(2,'0');

		lvi = new ListViewItem(textItem);
		lvi.SubItems.Add(textSub);

		this.listView1.Items.Add(lvi);
	}
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform