How do I load a datatable without using div element?

I have the following code snippet in one file(webix.js).

 {
    type: "line",
    rows: [
        cols: [{
            template: "<div id='dataGridView' style='height:100%; width: 100%; margin:0px'></div>",
            id: "dataGridView12344",
             borderless:true,

        }, {
            view: "resizer"
        }, {
            //template: "Image Viewer",
            css: "imageviewer",
            width: 250,
            id: "imageViewer",
            borderless:true,
        }]
    ]
}

Iā€™m declaring and loading the datatable from another file(datatable.js). Here is the code snippet:

var grid = new webix.ui({
                                        container: "dataGridView",
                                        id: "myGrid",
                                        view: "datatable",
                                        borderless: true,
                                        .......
                                  });

I am having issues when I change the size of the columns using resizer. The datatable will not extend/reduce its width automatically.
I want to load the datatable without using template (template: ā€œ

ā€). How can I use this?

Please help me!!!

Thank you.

It is expected. If you are initing component in the HTML container inside of other component it will not react to resizing events.

In above case you can attach onViewResize handler to the template and call grid.resize from it ( or just do not use template and embed datatable directly in the parent layout )