I have placed a ListView on my main form.
I put 24 columns in it
I set the view to details
I have an array of integers like this
public static int[] myArrayOfIntegers = new int[24];
public static bool TheArrayIsNowReady = false;
int i;
int j;
int k;
string UserSeesThis;
Now for my request for help, please. There are 151 properties and 233 Methods associated with a ListView. Could someone please help me to understand how to place my 24 integers in this listview for the user to see them ?
if (TheArrayIsNowReady)
{
for (i = 0; i < 24; i++)
{
UserSeesThis = myArrayOfIntegers[i].ToString();
listView1._____what___do___I___put___here___[i] = UserSeesThis;
}
}
After doing one line, I’m going to have to put 500 more lines in the list box, and let the user scroll back through them. (We’re hunting bogus numbers, if it matters)
In my dream app, I’ll let the user scroll back five or six thousand lines.
The user is going to run a test, and an external box will send the PC 500 sets of 24 numbers. I want to put those on the screen for the user to see. I would like to be able to handle the same five and ten times over.
1) Create a listviewitem,
ListViewItem item = new ListviewItem("firstvalue");2) Create subitems for each column,
item.SubItems.add("value");3) Add item to list,
listView1.Items.Add(item);