treeGrid dynamic loading kidsXmlFile as function

How to custom event for kidsXmlFile, is there custom event as function to request data/http when expand tree grid ?

Please, try to use the onDynXLS event:
https://docs.dhtmlx.com/api__link__dhtmlxtreegrid_ondynxls_event.html
It fires right before fetching the data.
Something like:

treegrid.attachEvent("onDynXLS", function(rowId){
    treegrid.load(`${some_url}?id=${rowId}.json`); //load data to the row
    return false // block default process of dynamic loading
});

Note: you still need to define the kidsXmlFile in your treegrid config for the dynamic loading usage. But the defined url will be (may be) ignored according to the conditions in your onDynXLS event handler.

1 Like