how to get reference for radcombobox in radgrid

2 posts, 1 answers
  1. Łukasz Kuryło
    Łukasz Kuryło avatar
    24 posts
    Member since:
    Jan 2010

    Posted 24 Feb 2010 Link to this post

    Hi all.
    I have a radcombobox in a radgrid, inside a gridboundcolumn filtertemplate. How can I get access to it?
    $find("myCombobox.ClientID") doesn't work.
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Feb 2010 Link to this post

    Hi Lukasz,

    You could properly get a reference to the RadComboBox by attaching OnClientLoad event handler to combo and retrieving the client object from the first argument.

    aspx:
     
    <FilterTemplate>  
        <telerik:RadComboBox ID="RadComboBox1" OnClientLoad="OnClientLoad" runat="server">   
        </telerik:RadComboBox> 
    </FilterTemplate>  

    javascript:
     
    var combo; 
    function OnClientLoad(sender, eventArgs)    
    {    
        combo = sender; 
     
    function myHandler()      
        var comboItem = combo.get_selectedItem();        
        // Access the combo in any function 

    All the best,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top