RadWindow with ContentTemplate isn't giving me the selected RadComboBox item

3 posts, 0 answers
  1. Kathy
    Kathy avatar
    35 posts
    Member since:
    Sep 2010

    Posted 23 Dec 2010 Link to this post

    I have a RadWindow with several RadComboBox controls.  I'm using javascript to get the selected value from these ComboBoxes.  It's pretty simple code:

    function OK_Clicked() {
                var oWindow = GetRadWindow();
                //Get current item
               var combo = <%= RadComboBox1.ClientID %>;
               var combotext = combo.valueOf();
    The combo is getting populated by a datasource.  Yet, it says object doesn't support this property or method ( the valueOf() call ).  All I'm trying to do is get the selected item.  Do I need to have an event on this combo, on the client side to note when the selected index changes?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Dec 2010 Link to this post


    You need to use $find() method to get the combo client object.
    Client-Side Basics

    And refer the following documentations which would help you to get selected item value.
    RadComboBox object
    RadComboBoxItem object

  3. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 24 Dec 2010 Link to this post

    Hello Kathy,

     Please note the following:

    1) When you are using ContentTemplate you do not need the GetRadWindow() function - this function is used to reference a RadWindow from inside its content page when another page is loaded. In the case of ContentTemplate you have all the content on the same page and using this function could cause an error.

    2) As Shinu pointed out, to reference a client AJAX object you should use the $find syntax.

    I hope that my reply is helpful and for your convenience I prepared and attached a sample demo for you. I also recommend to examine the RadWindow demos below to get a better understanding on how to use the control:


    Happy holidays!

    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