<
telerik:RadComboBox
ID="edtSubDisciplineID"
runat="server"
Width="100%"
DataTextField="disciplineName"
DataValueField="disciplineID"
Skin="Vista"
OnClientSelectedIndexChanging="loadCostCodes" >
</telerik:RadComboBox>
<
telerik:RadComboBox
ID="edtCostCodeID"
runat="server"
Width="100%"
DataTextField="costCodeFullName"
DataValueField="costCodeID"
Skin="Vista"
EnableLoadOnDemand="true"
OnItemsRequested="onCostCodeItemsRequested">
</telerik:RadComboBox>
and then, I've got the following Javascript on the same page:
<script type="text/javascript">
function loadCostCodes(item)
{
var ctrl = <%= edtCostCodeID.ClientID %>;
if (item.Index > 0)
{
ctrl.requestItems(item.Value, false);
}
else
{
ctrl.Items = [];
ctrl.setText(" ");
ctrl.clearItems();
}
}
</script>
Problem:
When I change the selected item in the parent combo, I get the following javascript error:
"Object doesn't support this property or method"
The problem occurs on the "item.Index" line, as well as the "ctrl.requestItems()" call. I have tried upper and lowercase. I have put alert() calls in there and verified I have the control is found properly. I have verified that "item" passed into the javascript call is not null.
So, what am I missing? I have been thru the tutorials and forums messages to no avail. I am simply trying to get a parent/child cascading dropdown to work. Your help is appreciated!
Jim