Hi Cholet,
Thank you for contacting Syncfusion support.
At the load time, the TreeGrid will be rendered inside the hidden element of tab control. Hence, the control width and height will not be updated properly. To overcome this issue, we have to update the “SizeSettings” of TreeGrid once we switched to second tab.
For that Tab control have an event called “ItemActive”. It will be triggered when we switch the tab. In this event we can update the TreeGrid control size properly.
Please refer following code snippet,
@Html.EJ().Tab("TabAdmin")
//..
.ClientSideEvents(eve => eve.ItemActive("itemActive"))
<script type="text/javascript">
function itemActive(args) {
//returns current active index.
if(args.activeIndex == 1){
var obj = $("#TreeGridContainer").data("ejTreeGrid");
obj.setModel({ "sizeSettings": { "height": "450px", "width": "100%" } });
}
</script> |
Please refer following tab event online documentation link as below,
Please let us know, if you require any other assistance.
Regards,
Jayakumar D