By using a HierarchicalDataSource, the first time a node is expanded, the data is fetch from the data source.
The next time, the data is not retrieved from the data source.
How can one define, that on each expand, the data should be fetched from the data source?
The next time, the data is not retrieved from the data source.
How can one define, that on each expand, the data should be fetched from the data source?
6 Answers, 1 is accepted
0
Hello Harry,
Alex Gyoshev
the Telerik team
Set the loaded flag of the datasource Node to false.
Regards,Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Iwhp
Top achievements
Rank 1
answered on 14 Aug 2012, 10:10 AM
Thankx! I tried the following:
treeview.bind("expand", function (e) {
e.node.loaded(false);
});
but the .loaded function is not defined here. Are there other options?
treeview.bind("expand", function (e) {
e.node.loaded(false);
});
0
Accepted
Hello Harry,
Alex Gyoshev
the Telerik team
The loaded function is part of the HierarchicalDataSource Node object (rather than of the DOM object of the treeview node):
// get the Node object (model)
var dataItem = this.dataItem(e.node);
dataItem.loaded(false);
Kind regards,Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Iwhp
Top achievements
Rank 1
answered on 14 Aug 2012, 01:33 PM
Thankx a lot, it is getting the data now.
So one small issue remains on my side:
BUG: the visual indicator, that the data is fetched from the data source, is not shown the second time.
Workaround: When I collapse the parent above the one which should be fetched and then open the child, then the indicator is shown.
So one small issue remains on my side:
BUG: the visual indicator, that the data is fetched from the data source, is not shown the second time.
Workaround: When I collapse the parent above the one which should be fetched and then open the child, then the indicator is shown.
0
Hello Harry,
Alex Gyoshev
the Telerik team
We have made some improvements in the next internal build, which should be available in a few hours. Please try it out and see if the bug persists.
Greetings,Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Greg
Top achievements
Rank 1
answered on 22 Aug 2012, 03:32 AM
Finally found what I needed...thank you for this information!