tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Horizontal scroll bar when height: 100% #934

Closed yedajiang44 closed 4 years ago

yedajiang44 commented 5 years ago

version:v5.3.2

browser: Google Chrome

browser version: 70.0.3538.67

Horizontal scroll bar when set height: 100% ,I don't think y appear scroll bar, let all the content is visible,like demo

$(document).ready(function () {
    $("#jqGrid").jqGrid({
        url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders',
        mtype: "GET",
        datatype: "jsonp",
        styleUI: "Bootstrap",
        colModel: [
            { label: 'OrderID', name: 'OrderID', key: true, width: 75 },
            { label: 'Customer ID', name: 'CustomerID', width: 150 },
            {
                label: 'Order Date', name: 'OrderDate', width: 150,
                formatter: 'date', formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'ShortDate' }
            },
            { label: 'Freight', name: 'Freight', width: 150 },
            { label: 'Ship Name', name: 'ShipName', width: 150 }
        ],
            viewrecords: true,
            height: "100%",//just change here,I don't think y appear scroll bar, let all the content is visible
            rowNum: 20,
            pager: "#jqGridPager"
    });
});

image

Why is that?Setup is not correct?

tonytomov commented 5 years ago

Thanks. With every new version of Chrome ther is a diffrent behaviour. I have fixed this with version 68.x, but now it appear again. Will see how to precess with this.

yedajiang44 commented 5 years ago

@tonytomov Thank you for your reply, I am also the first time I have encountered an old version that I have been using before.I hope to fix it as soon as possible, thank you again for your work for this library. ^_^ .

tonytomov commented 5 years ago

I have fixed the problem. Can you please let me know if it is working for you? Thanks

yedajiang44 commented 5 years ago

@tonytomov I'm sorry!I didn't find there are updated

tonytomov commented 5 years ago

Download from here: https://github.com/tonytomov/jqGrid/archive/master.zip - this is the latest build

yedajiang44 commented 5 years ago

Thank you very much!I'm coming test right now

yedajiang44 commented 5 years ago

@tonytomov Thank you!this bug is fix,thanks for your works

yedajiang44 commented 5 years ago

hey man! i am sorry for reopen this iss. a new cause the bug repetition please look at the code

<script type="text/javascript">
    $(document).ready(function () {
        $("#jqGrid").jqGrid({
            url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders',
            mtype: "GET",
            styleUI: 'Bootstrap',
            datatype: "jsonp",
            rownumbers: true,
            autowidth: true,
            autoScroll: true,
            viewrecords: true,
            multiselect: true,
            colModel: [
                { label: 'OrderID', name: 'OrderID', key: true, hidden: true },//this bug will appear when I set the hide
                { label: 'Customer ID', name: 'CustomerID' },
                { label: 'Order Date', name: 'OrderDate' },
                { label: 'Freight', name: 'Freight' },
                { label: 'Ship Name', name: 'ShipName' }
            ],
            height: "100%",
            rowNum: 20,
            pager: "#jqGridPager"
        });
    });
</script>
tonytomov commented 5 years ago

Thanks will check it, but I'm currious to know what is

autoScroll: true

Guriddo jqGrid does not have such option. Do you use your own version. What mean this option?

yedajiang44 commented 5 years ago

checked the documentation, there is really no such configuration, but the bug still exists after deletion.

tonytomov commented 5 years ago

I mentioned that there is no such option, so it will not impact the problem - I'm just curious about if you use your own version (or other one) and what this option mean?!?

yedajiang44 commented 5 years ago

I am using the latest version, this option is to configure horizontal scrolling when configuring shrinkToFit: true