jQWidgets Forums

jQuery UI Widgets Forums Grid Dropdown Grid IE 9 Width Bug

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Dropdown Grid IE 9 Width Bug #25731

    xmon72206
    Member

    Hello,

    I having a problem with paging the drop down grids in IE 9 when I set the grids width to a percentage.  It works fine in IE 8.

    After clicking the next page button the width of the grid seems to be big as its container and once your cursor leaves the grid, its width is really thin.  It breaks whether or not virtual mode is turn on.

    If I change the page size the grid’s width returns to its original size, but paging still breaks it.

    Also noticed that if I turn off the auto height option the problem goes away.

    We are on JWidgets 2.9.0.

    Heres some sample code.

    $(document).ready(function () {
    
        var theme = '';
    
        var url = "/javascript/jqwidgets/demos/sampledata/products.xml";
    
        var source =
        {
            datatype: "xml",
            datafields: [
                { name: 'ProductName', type: 'string' },
                { name: 'QuantityPerUnit', type: 'int' },
                { name: 'UnitPrice', type: 'float' },
                { name: 'UnitsInStock', type: 'float' },
                { name: 'Discontinued', type: 'bool' }
            ],
            root: "Products",
            record: "Product",
            id: 'ProductID',
            url: url
        };
    
    	$("#jqxdropdownbutton").jqxDropDownButton( { 
    		width: '50%',
    		height: 25,
    		theme: theme 
    	});
    
        $("#jqxgrid").jqxGrid(
        {
            width: '50%',
            source: source,
            theme: theme,
            pageable: true,
            //autoheight: true,
            altrows: true,
            selectionmode: 'singlerow',
            columns: [
              { text: '', datafield: 'ProductName', width: 70},
              { text: 'Quantity per Unit', datafield: 'QuantityPerUnit', cellsalign: 'right', align: 'right', width: 120 },
              { text: 'Unit Price', datafield: 'UnitPrice', align: 'right', cellsalign: 'right', cellsformat: 'c2', width: 100 },
              { text: 'Units In Stock', datafield: 'UnitsInStock', cellsalign: 'right', width: 100 },
              { text: 'Discontinued', datafield: 'Discontinued' },
            ]
        });
    });

    Xmon72206

    Dropdown Grid IE 9 Width Bug #25755

    Peter Stoev
    Keymaster

    Hi Xmon72206,

    It is wrong to set the Grid’s width and height in percentages when you want to display it in a DropDownButton and the reason is that the DropDownButton’s DropDown size is calculated by the size of its content. If you wish to display a Grid within a DropDownButton, then you should use Fixed Width and Height.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.