To get the index value of the selected item, read the value of the
SelectedIndex property
Ollie
"Ram" <(E-Mail Removed)> wrote in message
news:5CBF50D8-7552-4228-91E5-(E-Mail Removed)...
> Dear Helpers,
>
> I assigened values to checkedlistbox control in the following way
>
> cList.DataSource=oDs.Tables[bTableNo].DefaultView;
> cList.DisplayMember=oDs.Tables[bTableNo].Columns[1].ToString();
> cList.ValueMember=oDs.Tables[bTableNo].Columns[0].ToString();
>
> where oDs is DataSet
>
> the purpose is to display the batchname and allow the user to select
multiple batches. To identify the user selection i assigned the BatchID to
Value Member.
>
> Once the user makes his selection i want to get the selected batch id. I
am able to get the display name by verifying if the item is checked or not.
But i dont want the display name. I want to get the IDs associated to that
names. I tried using CheckedIndex collection with out any success.
>
> Please advice. I am new to C#
>
> Thanks & Regards
|