Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
620
HierarchicalGrid Width 100% Autosize all columns shows horizontal scrollbar
posted

I'm using the igHierarchicalGrid. I'm creating it like this:

$grid.igHierarchicalGrid({
            width: "100%",
            dataSource: data,
            dataSourceType: "json",
            responseDataKey: "Data",
            autoGenerateColumns: false,
            columns: colsArray,
            defaultColumnWidth: "*",
            autoGenerateLayouts: false,
            columnLayouts: layoutsArray,
            features: [
                        { name: "MultiColumnHeaders" },
                        {
                                    name: "Sorting",
                                    type: "local",
                                    mode: "multi",
                                    persist: true
                        },
                        {
                                    name: "Filtering",
                                    type: "local",
                                    persist: true
                        }
            ]
        });

I don't have width defined in any of the columns and I also have defaultColumnWidth: "*" in every layout. However the main grid (the most outer one) generates an horizontal scrollbar.

I've checked and the divs #grilla_table_container and #grilla_table_scroll are created ok but the table inside has width property set with 30 extra pixels. I think it has to do with the default value of expandColWidth. If I set that property with a value of 0, no scrollbar is shown but of course, the expand column dissapears.

How can I avoid the horizontal scrollbar?

Thanks!