I tried to follow Cascading ComboBoxes, but I cannot make it work. The code is as follows...
Something seems to be missing. After loading the first combobox contains all data, the second combobox is disabled. When selecting a value from the first combobox, the second combobox shows a spinning icon, looping forever.
Michael G. Schneider
<input id=
"cmb21a"
/>
<input id=
"cmb21b"
/>
<script>
$(
"#cmb21a"
).kendoComboBox({
dataTextField:
"name"
,
dataTextValue:
"parentID"
,
dataSource: {
data: [
{ parentID: 1, name:
"P1"
},
{ parentID: 2, name:
"P2"
},
{ parentID: 3, name:
"P3"
}
]
}
});
$(
"#cmb21b"
).kendoComboBox({
cascadeFrom:
"cmb21a"
,
dataTextField:
"name"
,
dataTextValue:
"id"
,
dataSource: {
data: [
{ parentID: 1, id: 11, name:
"P1a"
},
{ parentID: 1, id: 12, name:
"P1b"
},
{ parentID: 1, id: 13, name:
"P1c"
},
{ parentID: 2, id: 21, name:
"P2a"
},
{ parentID: 2, id: 22, name:
"P2b"
},
{ parentID: 2, id: 23, name:
"P2c"
},
{ parentID: 3, id: 31, name:
"P3a"
},
{ parentID: 3, id: 32, name:
"P3b"
}
]
}
});
</script>
Michael G. Schneider