TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Iain
NA
7
20.1k
listviewitem constructor problem
Mar 14 2011 6:25 PM
Hi All,
I'm learning c# so apologies if this is a stupid question
I get the error 'listviewitem does not contain a constructor that takes 1 arguments'.
The code I'm using is the following
string[] lViewItem = new string[2];
foreach (Collect c in collect)
{
lViewItem[0] = c.Id.ToString();
lViewItem[1] = c.Name;
ListViewItem lvi = new ListViewItem(lViewItem);
listView1.Items.Add(lvi);
What am I doing wrong.
Thanks in advance.
Reply
Answers (
9
)
Adjusting column Header Height in a listview control
Background Image Resource Name