Dhtmlx Tree Grid AutoWidth


#1

Attempted several combinations to have a TreeGrid width scale to a window or element to no success.

https://snippet.dhtmlx.com/58f0fyy2

On the snippet editor it returns an error where the observer fails when the window is sized


#2

Could you please, clarify your request


#3

I don’t think there’s a way to set components to automatically adjust their width to match their container, because they use absolute values and not percentages. However, you can use the document.body.onresize function to determine the width of the container when it’s resized, and resize the component to that value. See my update to your snippet: https://snippet.dhtmlx.com/saa2fcjf