javascript - Kendo UI HierarchicalDataSource for Treeview with dynamic schema -
i'm trying display kendo treeview hierarchicaldatasource. it's simple region, country, city hierarchy difficulty comes fact have 3 possible levels of regions , countries can appear @ second or @ third level. basically, - first level of regions contains other regions - second level of regions contains other regions or countries - third level of regions contains countries here schemas: var portsschema = { schema: { data: "portlist", model: { id: "code" } } }; var countryschema = { schema: { data: "countrylist", model: { id: "code", children: portsschema } } }; var regioncountryschema = { schema: { data: "regionlist", model: {