I am looking at creating an array of string based variables in order to understand which text boxes have been checked, for example:
string[] checkedItems = new string[10];
foreach (object item in checkedList.CheckedItems)
{
checkedItems.SetValue(item, 0);
}
I need this to basically, understand which checkboxes have been ticked, then show the results.
Later the results will be used to compare excel spreadsheets. So with that understanding each item is a "Column"
I have also tried writing:
checkedItems.SetValue(item, 0);
checkedItems.SetValue(item, 1);
checkedItems.SetValue(item, 2);
checkedItems.SetValue(item, 3);
This just shows for example:
Array slot 1 = DocID
Array slot 2 = DocID
Array slot 3 = DocID.
I believe this is because it is just looping for every checkbox. There are 10.
checkedItems.SetValue(item, 0);is just going to repeatedly overwrite the element at index0whilst looping over the checked items, have you tried using aforloop instead and passing in the index? Where is theDocIDcoming from? How are you outputting these values?objectto astringelement.