Question subject: How can i display these items in Listview in C#?
Posted: Wed Apr 07, 2010 6:12 pm
Joined: Wed Apr 07, 2010 6:07 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
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 ?
lstview.Items.Clear(); int counterOfArraylist = mcarraylist.Count; string[] str = new string[counterOfArraylist]; for (int i = 0; i < str.Length; i++) {
Question subject: Re: How can i display these items in Listview in C#?
Posted: Sun May 23, 2010 7:02 pm
Joined: Sat Jan 17, 2009 7:51 pm Posts: 13 Has thanked: 0 time Have thanks: 1 time
hi, I hope this code help you.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
namespace listview { public partial class Form1 : Form { public Form1() { InitializeComponent(); }