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

get rad combobox id

1 Answer 215 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
naresh
Top achievements
Rank 1
naresh asked on 19 Feb 2009, 07:23 AM
their is common javascript function for two radcombo for  onclient selectedindex changed , i have to find
which radcombo box fire onclient selected index and on client selected index function i get combobox id that fire function
thank u

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 19 Feb 2009, 08:31 AM
Hi naresh,

Here's a sample code snippet that shows the needed approach.

<form id="form1" runat="server"
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"
</telerik:RadScriptManager> 
<script type="text/javascript"
function OnClientSelectedIndexChanged(sender, eventArgs) 
alert(sender.get_id()); 
</script> 
<telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"
<Items> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" /> 
</Items> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</telerik:RadComboBox> 
<telerik:RadComboBox ID="RadComboBox2" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"
<Items> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem4" Value="RadComboBoxItem4" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem5" Value="RadComboBoxItem5" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem6" Value="RadComboBoxItem6" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem7" Value="RadComboBoxItem7" /> 
    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem8" Value="RadComboBoxItem8" /> 
</Items> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</telerik:RadComboBox> 
</form> 


Greetings,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ComboBox
Asked by
naresh
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or