how to get dropdown item index??

4 posts, 0 answers
  1. Mike
    Mike avatar
    15 posts
    Member since:
    Nov 2013

    Posted 01 Mar 2014 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Mar 2014 in reply to Mike Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike
    Mike avatar
    15 posts
    Member since:
    Nov 2013

    Posted 03 Mar 2014 in reply to Shinu Link to this post

    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

  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Mar 2014 in reply to Mike Link to this post

    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.
Back to Top