This is a migrated thread and some comments may be shown as answers.

how to get reference for radcombobox in radgrid

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Łukasz Kuryło
Top achievements
Rank 1
Łukasz Kuryło asked on 24 Feb 2010, 06:17 PM
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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 25 Feb 2010, 04:41 AM
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.
Tags
Grid
Asked by
Łukasz Kuryło
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or