Getting selected value on page load

2 posts, 0 answers
  1. Blop
    Blop avatar
    19 posts
    Member since:
    Feb 2012

    Posted 30 Apr 2012 Link to this post

    Hi, for 2 hours now I'm trying to get a selected value on page load...
    I'm using jquery and I ve read every page about radcombox on client-side...

    here's what I do.
    Some one to tell me what's wrong?

      $j(document).ready(function() {
          var combo = getElem("<%= myCombobox.ClientID %>");
          var item = combo.get_selectedItem();
          var val = item.get_value();
  2. Dimitar Terziev
    Dimitar Terziev avatar
    1268 posts

    Posted 01 May 2012 Link to this post


    When the document ready event is fired the client side object of the RadComboBox is not yet initialized, this is why the pageLoad event should be used instead. Also the $find function should be used to obtain a references to the client-side object of the control.

    Kind regards,
    Dimitar Terziev
    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.
Back to Top