Find Value of Combobox in RadPanel

3 posts, 0 answers
  1. Aaron
    Aaron avatar
    5 posts
    Member since:
    Dec 2011

    Posted 27 Aug 2012 Link to this post

    I am trying to do a redirect in codebehind based on the value a user has selected in a combobox.  Can someone please tell me how to access the value? Using VB.NET please!


    **UPDATE: How do I access the button as well?  Can someone give me a codebehind example please in VB.NET  

    <telerik:RadPanelBar ID="RadPanelBar2" Runat="server" Width="100%" ExpandMode="SingleExpandedItem">
                            <telerik:RadPanelItem runat="server" Text="PURCHASE ACCOUNT CREDITS">
                                    <telerik:RadPanelItem Value="AccountCredits" runat="server">
                                            <table width="100%" border="0" cellspacing="2" cellpadding="2">
                                                <tr align="center">
                                                    <td>How many credits would you like to purchase?</td>
                                                <tr align="center">
                                                        <telerik:RadComboBox ID="cbxCredits" runat="server">
                                                                <telerik:RadComboBoxItem runat="server" Text="$1.00 - 4 Credits" Value="1.00" />
                                                                <telerik:RadComboBoxItem runat="server" Text="$5.00 - 25 Credits" Value="5.00" />
                                                                <telerik:RadComboBoxItem runat="server" Text="$10.00 - 50 Credits" Value="10.00" />
                                                    <td align="center">
                                                        <telerik:RadButton ID="btnCheckout" runat="server" Text="CONTINUE TO CHECKOUT..."></telerik:RadButton>

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

    Posted 28 Aug 2012 Link to this post

    Hi Aaron,

    You can access the controls as follows.

    Dim rcb As RadComboBox = DirectCast(RadPanelBar2.FindItemByValue("AccountCredits").FindControl("cbxCredits"), RadComboBox)
    Dim value As String = rcb.SelectedValue
    Dim btn As RadButton = DirectCast(RadPanelBar2.FindItemByValue("AccountCredits").FindControl("btnCheckout"), RadButton)

  3. Dennis
    Dennis avatar
    16 posts
    Member since:
    Jan 2013

    Posted 07 Feb 2018 Link to this post

    How would you do that in javascript?
Back to Top