FIrst of all, when talking about a control, it's vitally important that
you say if you are using a WinForms control (for Windows apps), or a
WebControl (for ASP.NET apps). They are quite different, but they often
have the same names.
So, I'm going to assume that you are using a WinForms CheckedListBox
control, and that you've gotten the list of indexes via
checkedListBox.CheckedIndices property. Well, the simpliest thing is to
ignore that and use checkedListBox.CheckedItems which gives you exactly
what
you want.
If you really want to continue using checkedListBox.CheckedIndices, you
can access the items via the Items property:
foreach( int i in checkedListBox.CheckedIndices)
{
string name = checkedListBox.Items
as string;
}
Hrvoje Voda said:
I got the index of all checked values, but I don't know how to read data of
that value?
For example.. in list box I have Names of users. First is John(index 1),
Second is Jack(index 2) and so on...
How to get the names ?