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
April Zoomm
NA
1
0
How can i display these items in Listview in C#?
Apr 7 2010 9:14 AM
Hi all,
I have an ArrayList that contains 70 items. I would like to display these items in Listview. Therefore, I used the following code.
However, When I press the button, program will only display the first seven items in the arrayList. The rest of items are not being displayed in listview.
How can I fix this problem ?
Cheers,
------------BEGIN---------------
private void btn_CreateReport_Click(object sender, EventArgs e)
{
lstview.Items.Clear();
int counterOfArraylist = mcarraylist.Count;
string[] str = new string[counterOfArraylist];
for (int i = 0; i < str.Length; i++)
{
str[i] = mcarraylist[i].ToString();
}
lstview.Items.Add(new ListViewItem(str));
}
------------END---------------
Reply
Answers (
1
)
How Do I: Save , read and change data within the assembly.
how to create "save" and "savaAS" in MDI application? logic