This is a migrated thread and some comments may be shown as answers.

Possible bug; Grid height: 'auto' not working Firefox with Kendo version 2012.1 322

3 Answers 231 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Drew
Top achievements
Rank 1
Drew asked on 18 Apr 2012, 02:30 PM
Just updated to version 2012.1 322 and a grid has stopped sizing the height correctly in Firefox. It displays with only a height equivalent to one row, but it can still be scrolled. I've attached a screenshot, normally this should size to show 10 rows.

The grid in question has a detail template, but does not have an explicit template for the master rows. Here's my main setup script:

var dataSource = new kendo.data.DataSource({
    data: gblProductsData,
    schema:
    {
        model:
        {
            fields:
            {
                id: { type: 'string' },
                referencecode: { type: 'string' },
                description: { type: 'string' },
                category: { type: 'string' },
                unitofmeasureid: { type: 'string' },
                buffergroupid: { type: 'string' },
                defaultorderworkflowtypeid: { type: 'string' },
                isarchivedproduct: { type: 'boolean' }
            }
        }
    },
    pageSize: 10
});
 
//Reset grid
$('#divProductGrid').html('');
 
//Setup grid
gblDivProductGrid = $('#divProductGrid').kendoGrid({
    dataSource: dataSource,
    autoBind: true,
    height: 'auto',
    scrollable: true,
    filterable: true,
    sortable: true,
    groupable: false,
    pageable: true,
    toolbar: productGridToolbarTemplate,
    detailTemplate: productGridDetailTemplate,
    detailInit: InitialiseProductDetails,
    detailExpand: ProductDetailExpand,
    detailCollapse: ProductDetailCollapse,
    columns:
    [
        {
            field: 'referencecode',
            title: 'Reference Code'
        },
        {
            field: 'description',
            title: 'Description'
        },
        {
            field: 'category',
            title: 'Category',
            filterable: false
        },
        {
            field: 'unitofmeasureid',
            title: 'Unit Of Measure',
            filterable: false
        },
        {
            field: 'buffergroupid',
            title: 'Buffer Group',
            filterable: false
        }
    ]
});

Changing 'scrollable' to 'false' fixes this problem, though of course the grid won't resize horizontally when the window resizes. It all still works fine  in Chrome and IE.

3 Answers, 1 is accepted

Sort by
0
Accepted
Daniel Botero Correa
Top achievements
Rank 1
answered on 20 Sep 2012, 07:36 PM
Hi,

I think you have to remove height attribute and grid will be resized automatically. That works for me.

Daniel
0
Drew
Top achievements
Rank 1
answered on 21 Sep 2012, 08:13 AM
Just tried it, doesn't seem to work for me, still getting the squashed grid in Firefox. It works fine in everything else, it's just Firefox that's the problem.
0
Drew
Top achievements
Rank 1
answered on 09 Oct 2012, 02:41 PM
The July 2012 release fixed this issue, Daniel's advice to remove the height: 'auto' attribute now also works in Firefox.
Tags
Grid
Asked by
Drew
Top achievements
Rank 1
Answers by
Daniel Botero Correa
Top achievements
Rank 1
Drew
Top achievements
Rank 1
Share this question
or