This is a migrated thread and some comments may be shown as answers.

how to get dropdown item index??

3 Answers 445 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 01 Mar 2014, 09:41 AM
this is how I do it with a MS dropdown:

DropDown1.Items.IndexOf(DropDown1.Items.FindByValue(elementValue))

How is this done in VB with a radDropDown??

thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2014, 03:11 AM
Hi Mike,

Please try the following code snippet to get the index of the RadDropDownList Item.

VB:
Dim index As Integer = RadDropDownList1.FindItemByValue("2").Index

Thanks,
Shinu.
0
Mike
Top achievements
Rank 1
answered on 03 Mar 2014, 06:27 AM
Thanks Shinu!

That worked. Great job!

Now can you tell me where in the documentation or help that information is located ??

I went round and round for hours on that simple thing, searching and trying different combinations...

let me know for next time
thanks
m

0
Shinu
Top achievements
Rank 2
answered on 04 Mar 2014, 03:26 AM
Hi Mike,

Please take a look into this help documentation for further information about working with Items in Server side Code. The RadDropDownList and RadComboBox look much the same especially when it comes to dropdownlist and single selection functionality. So that you can refer the provided link to know more about the server side basics.

Thanks,
Shinu.
Tags
DropDownList
Asked by
Mike
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mike
Top achievements
Rank 1
Share this question
or