Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#ddlTest_I").kendoComboBox({
- dataTextField: "parentName",
- dataValueField: "parentId",
- dataSource: [
- { parentName: "Parent1", parentId: 1, childName: "Child1", childId: 1 },
- { parentName: "Parent2", parentId: 2, childName: "Child2", childId: 2 },
- { parentName: "Parent1", parentId: 1, childName: "Child3", childId: 3 },
- { parentName: "Parent2", parentId: 2, childName: "Child4", childId: 4 },
- { parentName: "Parent1", parentId: 1, childName: "Child5", childId: 5 }
- ]
- });
- $("#ddlTest_II").kendoComboBox({
- cascadeFrom: "ddlTest_I",
- dataTextField: "childName",
- dataValueField: "childId",
- dataSource: [
- {parentName: "Parent1", parentId: 1, childName: "Child1", childId: 1 },
- { parentName: "Parent2", parentId: 2, childName: "Child2", childId: 2 },
- { parentName: "Parent1", parentId: 1, childName: "Child3", childId: 3 },
- { parentName: "Parent2", parentId: 2, childName: "Child4", childId: 4 },
- { parentName: "Parent1", parentId: 1, childName: "Child5", childId: 5 }
- ]
- });
- var comboDataSource = new kendo.data.DataSource(parentDatasource.data()); // pseudo
- comboDataSource.add(parentDatasource.data()[0]); // might need add item by item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement