I have two comboboxes and would like to pass the selected value and text to the server method (RadComboBoxItemsRequestedEventArgs) when the first selected combobox index has changed.
Here is my code. But I get a Javascript error on this line. RadComboBox2.requestItems(item, false). Thanks for the help.
<telerik:RadComboBox
ID="RadComboBox1"
runat="server"
OnClientSelectedIndexChanging="LoadNames"
OnItemsRequested="RadComboBox1_ItemsRequested"
/>
<telerik:RadComboBox
ID="RadComboBox2"
runat="server"
AllowCustomText="true"
OnItemsRequested="RadComboBox2_ItemsRequested"
/>
.
function LoadNames(combo, eventArqs)
{
var item = eventArqs.get_item();
var RadComboBox2= $find('<%= RadComboBox2.ClientID %>');
RadComboBox2.requestItems(item, false);
}
protected void RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
LoadNames(e.Text, e.Value);
}
source
share