JavaScript RadComboBox SelectedValue

7 posts, 0 answers
  1. archimede
    archimede avatar
    103 posts
    Member since:
    Jul 2006

    Posted 16 Jul 2010 Link to this post

    I want to obtain via Javascript the SelectedValue of a RadComboBox but it seem not possible.
    My goal is to change (clientside) RadComboBox1 selectedvalue, starting from another javascript event.

    Here you can find the example page:

    <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderBody" runat="Server">
        <script type="text/javascript">  
            function getvalue()  
                var combo = <%=RadComboBox1.ClientID %>;
                alert( document.getElementById(combo.UniqueID + "_value").value );
        <telerik:RadComboBox ID="RadComboBox1" runat="server">
                <telerik:RadComboBoxItem Text="Item1" Value="Value1" />
                <telerik:RadComboBoxItem Text="Item2" Value="Value2" />
                <telerik:RadComboBoxItem Text="Item3" Value="Value3" />
        <input id="Button1" type="button" value="button" onclick="getvalue();" />

    Anyone can help?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jul 2010 Link to this post


    You could use the $find() method to get reference to AJAX control's client object.

    Here is the sample code:
    <script type="text/javascript"
        function getvalue() 
            var combo = $find('<%=RadComboBox1.ClientID %>');

    And for more information about client methods of RadComboBox, go through the links below:
    RadComboBox object
    RadComboBoxItemCollection object

  3. Jehad
    Jehad avatar
    1 posts
    Member since:
    Sep 2012

    Posted 09 Sep 2012 Link to this post

    telerik RadComboBox  :: Get Selected value by js

    function getSelectedValue() {

     var ddlCurrency = document.getElementById('ddlCurrencyID');

     var selectedValue = ddlCurrency.control._value;

     var selectedText =  ddlCurrency.control._text;


  4. Nencho
    Nencho avatar
    1666 posts

    Posted 10 Sep 2012 Link to this post


    Considering we aim to get the value of an Ajax Control, the better approach is to access the client instance of the control with $find() instead of accessing the DOM element with document.getElementById(). Please consider implementing the approach that Shinu has proposed.
    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Rajeeve
    Rajeeve avatar
    3 posts
    Member since:
    Aug 2016

    Posted 11 Aug 2016 Link to this post

    var checkeditems;
    var combo = $find("<%= telerikcomboboxname.ClientID%>")
     var items = combo.get_checkedItems();
      for (i = 0; i < items.length; i++) {

                            if (i == 0) {
                                radvalue = Number(parseInt(items[i]._properties._data.value));
                               checkeditems=checkeditems+radvalue ;
                            else {
                                radvalue = Number(parseInt(items[i]._properties._data.value));
                                checkeditems= checkeditems+ "," + radvalue;

  6. Shailesh
    Shailesh avatar
    1 posts
    Member since:
    May 2017

    Posted 22 May in reply to Shinu Link to this post

    Not working for me.
  7. Arun
    Arun avatar
    3 posts
    Member since:
    Jun 2017

    Posted 07 Jun Link to this post

               function ShowEditForm(rowIndex)
                     var combo = $find("<%=RadDrpListCity.ClientID%>");
                     var itm = combo.findItemByText(City.innerText);
                    var id = combo.get_selected_Item().get_value();

    not able to get the selected DataValue(not text value) of RadDropDownList. Any suggestions?? 

Back to Top