finding selected value of DropDownList in Tab

2 posts, 0 answers
  1. Richard
    Richard avatar
    63 posts
    Member since:
    Apr 2008

    Posted 20 Jul 2009 Link to this post

    I have a DropDownList inside of a PageView on my tabstrip.  Can someone give me a javascript example of how I would reference the DropDownList and more importantly, how to find the SelectedText of the DropDownList?

    I am using the following code to reference the DropDownList, but cannot get the selected text:

    var filterName = $telerik.findElement(pageView1.get_element(), "ddlFilterNames");  
  2. Paul
    Paul avatar
    4281 posts

    Posted 23 Jul 2009 Link to this post

    Hello Richard,

    Nothing special about that - you just reference it directly, i.e.

     <form id="form1" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        <script type="text/javascript"
            function test() { 
                var dd = $get("<%= DropDownList1.ClientID %>"); 
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1"
                <telerik:RadTab runat="server" Selected="True" Text="Root RadTab1"
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
            <telerik:RadPageView ID="RadPageView1" runat="server"
                <asp:DropDownList ID="DropDownList1" runat="server"
        <input id="Button1" type="button" value="button" onclick="test()" /> 

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top