Reputation: 692
I am having problems with a subborn listview object. I have set it up exactly the same way as one that is functioning properly. The problem is when I add items in with a for each statements they are added as rows instead of columns. Hopefully this is simple.
My constructor code
String userstring;
this.Users.Columns.Add("User");
foreach (User user in UserListing.userListing)
{
userstring = "";
userstring += user.getUsername() + " ";
userstring += " Has Admin Rights:" + user.getRights().ToString() + " ";
userstring += " Has Write Access:" + user.getRights().ToString();
this.Users.Items.Add(new ListViewItem(userstring));
}
this.Show();
Upvotes: 0
Views: 1625
Reputation: 299
Well, I just want to add that I was using the Properties in the Visual Studio and changed View to List. That was solution to my problem.
Upvotes: 0
Reputation: 61
I had the same problem, and I fixed it by changing from
myListView.View = View.LargeIcon;
to
myListView.View = View.Details;
Should fix your problem as well.
Upvotes: 2