AutoResize does not work properly in ui-grid

2.8k Views Asked by At

I don't specified a width or height for the grid and used "ui-grid-auto-resize". It is working but not properly. There is just a small piece of grid over and therefore i see the scrollbars for that specific area (defined by ui-layout splitter). What can i do in order to get away from that scrollbars?

I also dont want to define a specific number for the height and width of the grid.enter image description here

And here is my html:

<div ui-layout-container size='300px'  >;
   <div id="asGrid" ui-grid="MetadataGridOptions" ui-grid-selection ui-grid-resize-columns ui-grid-auto-resize ui-grid-move-columns ui-grid-tree-view class="grid"></div>';
</div>"

And my grid definition:

$scope.GridOptions = {
        enableHorizontalScrollbar : 0,
        enableVerticalScrollbar : 1,
        excessRows : 20,
        enableSorting : true,
        enableFiltering : true,
        showTreeExpandNoChildren : true,
        enableFullRowSelection : true,
        enableRowHeaderSelection : false,
        rowHeight : 30,
        multiSelect : false,
        //horizontalScrollThreshold : 0,
        enableColumnMenus : true,
        rowEquality : false,
        enableColumnResizing : true,
        columnDefs : [{
                name : 'Name'
            }, {
                name : ' ',
                width : 40
            }, {
                name : '  ',
                width : 30
            }, {
                name : '   ',
                width : 30
            }, {
                name : '     ',
                width : 55
            }, {
                name : 'DataType'
            }, {
                name : 'IsRequired'
            }, {
                name : 'defaultValue'
            }, {
                name : 'ReadOnly'
            }, {
                name : 'Description'
            }
        ],
        showTreeExpandNoChildren : true
    }
0

There are 0 best solutions below