Javascript 调整大小时对话框内js网格的错误行为

Javascript 调整大小时对话框内js网格的错误行为,javascript,jquery,dialog,resize,jsgrid,Javascript,Jquery,Dialog,Resize,Jsgrid,我在对话框中有一个js网格,当我调整它的大小时,js网格的外观会改变 这是我的js网格第一次加载时的样子: 这就是我的js网格在尝试增加对话框后的样子: 这是这个对话框中我的js网格的初始化代码 $("#DataGrid").dialog({ minWidth: 1240, minHeight: 600 }); $("#DataGrid").jsGrid({ height: "100%", width: "70%", filtering: true,

我在对话框中有一个js网格,当我调整它的大小时,js网格的外观会改变

这是我的js网格第一次加载时的样子:

这就是我的js网格在尝试增加对话框后的样子:

这是这个对话框中我的js网格的初始化代码

$("#DataGrid").dialog({
    minWidth: 1240,
    minHeight: 600
});
$("#DataGrid").jsGrid({
    height: "100%",
    width: "70%",
    filtering: true,
    editing: true,
    inserting: true,
    sorting: true,
    paging: true,
    autoload: true,
    pageSize: 15,
    pageButtonCount: 5,
    datatype: "json",
    deleteConfirm: "Do you really want to delete the row?",
    controller: process_variables,
    ....................................................

加载js GRID和dialog时,以及在调整其大小以正确调整dialog和js GRID的自动大小时,如何使其都具有这些默认大小值?

我通过进行以下更改解决了我的问题:

$("#DataGrid").dialog({
    minWidth: 1240,
    minHeight: 600
});
$("#DataGrid").jsGrid({
    height: "auto",
    width: "70%",
    filtering: true,
    editing: true,
    inserting: true,
    sorting: true,
    paging: true,
    autoload: true,
    pageSize: 15,
    pageButtonCount: 5,
    datatype: "json",
    deleteConfirm: "Do you really want to delete the row?",
    controller: process_variables,
    ....................................................

我通过以下更改解决了我的问题:

$("#DataGrid").dialog({
    minWidth: 1240,
    minHeight: 600
});
$("#DataGrid").jsGrid({
    height: "auto",
    width: "70%",
    filtering: true,
    editing: true,
    inserting: true,
    sorting: true,
    paging: true,
    autoload: true,
    pageSize: 15,
    pageButtonCount: 5,
    datatype: "json",
    deleteConfirm: "Do you really want to delete the row?",
    controller: process_variables,
    ....................................................