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. How can I fix this problem ?
Cheers,
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));
}