Hi,
I have two RadComboBox controls on my page. Here is the markup for the combo boxes:
<telerik:RadComboBox OnClientSelectedIndexChanged="LoadLevels" Skin="Vista" ID="ApplicationComboBox" runat="server"/>
<telerik:RadComboBox Skin="Vista" ID="LevelComboBox" runat="server"/>
javascript:
function LoadLevels(item) {
var levelCombo = $find("<%= LevelComboBox.ClientID %>");
alert(item.Value);
levelCombo.RequestItems(item.Value, false);
}
server code:
LevelComboBox.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(LevelComboBox_ItemsRequested);
void LevelComboBox_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
LoadLevels(e.Value);
}
What is supposed to happen is once the user selects an item from the ApplicationComboBox control, the LevelComboBox gets updated/populated with corresponding data. I think I have followed the live demo pretty well. (http://demos.telerik.com/aspnet/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx)
I am having 2 issues:
1) Javascript throws an error saying "Object doesn't support this property or method". This gets thrown when I call the RequestItems method in javascript.
2) The item.Value is "undefined";
I have also tried to do this by subscribing to the selectedindexchanged event on the server side to update my second combo box. This works the first time, but if I select another value then the second combo box will not get updated.
Any help would be greatly appreciated.
Thanks,
Greg
I have two RadComboBox controls on my page. Here is the markup for the combo boxes:
<telerik:RadComboBox OnClientSelectedIndexChanged="LoadLevels" Skin="Vista" ID="ApplicationComboBox" runat="server"/>
<telerik:RadComboBox Skin="Vista" ID="LevelComboBox" runat="server"/>
javascript:
function LoadLevels(item) {
var levelCombo = $find("<%= LevelComboBox.ClientID %>");
alert(item.Value);
levelCombo.RequestItems(item.Value, false);
}
server code:
LevelComboBox.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(LevelComboBox_ItemsRequested);
void LevelComboBox_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
LoadLevels(e.Value);
}
What is supposed to happen is once the user selects an item from the ApplicationComboBox control, the LevelComboBox gets updated/populated with corresponding data. I think I have followed the live demo pretty well. (http://demos.telerik.com/aspnet/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx)
I am having 2 issues:
1) Javascript throws an error saying "Object doesn't support this property or method". This gets thrown when I call the RequestItems method in javascript.
2) The item.Value is "undefined";
I have also tried to do this by subscribing to the selectedindexchanged event on the server side to update my second combo box. This works the first time, but if I select another value then the second combo box will not get updated.
Any help would be greatly appreciated.
Thanks,
Greg