Is there any way to make child elements load on demand only in expand event, and control the expand status depending on data?
1 Answer, 1 is accepted
0
Accepted
Filip
Telerik team
answered on 30 Nov 2023, 11:42 AM
Hi, Andrei,
Load on demand can be achieved inside the onExpandChange event since it provides a level prop (an array that has all the indexes of the parent items). It can be used inside the getItemPath function which returns the expanded node and the parent. This way by obtaining the expanded `dataItem` you can make a request from the server and add its sub-items: