si, ho guardato la documentazione di msdn prima di postare, ma senza successo; applicando lo stesso codice:
codice:
// First show the index and check state of all selected items.
foreach (int indexChecked in chkmarcatoriA.CheckedIndices)
{
// The indexChecked variable contains the index of the item.
MessageBox.Show("Index#: " + indexChecked.ToString() + ", is checked. Checked state is:" +
chkmarcatoriA.GetItemCheckState(indexChecked).ToString() + ".");
}
// Next show the object title and check state for each item selected.
foreach (object itemChecked in chkmarcatoriA.CheckedItems)
{
// Use the IndexOf method to get the index of an item.
MessageBox.Show("Item with title: \"" + itemChecked.ToString() +
"\", is checked. Checked state is: " +
chkmarcatoriA.GetItemCheckState(chkmarcatoriA.Items.IndexOf(itemChecked)).ToString() + ".");
}
riesco a recuperare solo l'indice dell'elemento selezionato; non la stringa di testo che mi rappresenta la scelta.. nella seconda parte di codice infatti mi scrive sempre:
System.Data.DataRowView
qualche idea del perchè si comporti così??grazie.
p.s se può servire aggiungo che riempio le checkedlistbox tramite un DataSet