Dynamic access of RadToolBarDropDown Items

2 posts, 0 answers
  1. Tobias
    Tobias avatar
    7 posts
    Member since:
    Apr 2011

    Posted 03 Aug 2011 Link to this post


    i am using a RadToolbar with multiple RadToolBarDropDown-Controls, which are using the OnLoad-Method to attach the Datasource.

    My problem is that I am not able to verify, which button has been pressed, because the number of items in the drop down lists is not constant. I need a dynamic solution for this.

    I am using something like to following code in the background:

    Protected Sub Toolbar1_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles Toolbar1.ButtonClick
            Select Case e.Item.Index
            Case 1
                   dim testString as String = e.Item.Text           
            End Select
    End Sub

  2. Kate
    Kate avatar
    1898 posts

    Posted 05 Aug 2011 Link to this post

    Hi Tobias,

    Instead of the Index you can use the Value property of the  buttons to determine which one is clicked. To use the Value property first you will need to explicitly specify it.

    Kind regards,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top