jqgrid-添加滚动条到长viewModel [英] jqgrid- add scroll bar to long viewModel
问题描述
我添加了视图选项(当点击一行,然后点击'view'按钮,在网格的左下角,它打开一个模型,其中包含该行的所有信息。
我看到模型有一些CSS样式:
overflow-hidden
因此,如果我有一定数量的列,以显示一定的高度后,我在创建网格时给它,它们被隐藏。
如何使对话框框为:
overflow-auto
如果可能的话,我只想让内部div滚动,并留下对话框的标题和底部的按钮。
我如何做到这一点?
myGrid.jqGrid('navGrid','#pager',
{edit :false,add:false,del:false,search:false,view:true},//选项
{},//使用默认设置编辑
{},//使用默认设置添加
{},//删除del:false我们需要这个
{},
{height:250,jqModal:false,closeOnEscape:true} //查看选项
);
我试过:
$('#viewmod'+ myGridId).css({overflow:'auto'});
但它没有工作...
声明视图选项时添加dataheight选项...
{dataheight:250,jqModal:false,closeOnEscape:true} //查看选项
I am using a jqGrid that has allot of columns to it.
I added the view option (when clicking on a row and then on the 'view' button, in the bottom left corner of the grid, it opens a model with all the info for that row.
I see that the model has some css style:
overflow-hidden
Therefor if i have allot of columns to show after a certain height that i gave it when creating the grid, they get hidden.
How can i make that dialog box be:
overflow-auto
If possible i want only the inside div to scroll and leave the header of the dialog and the buttons on bottom there all the time.
How can i do this?
myGrid.jqGrid('navGrid', '#pager',
{ edit: false, add: false, del: false, search: false, view: true }, //option
{}, // use default settings for edit
{}, // use default settings for add
{}, // delete instead that del:false we need this
{},
{ height: 250, jqModal: false, closeOnEscape: true} // view options
);
I tried this:
$('#viewmod'+myGridId).css({overflow: 'auto'});
But it didnt work...
Found the answer for this.
When declaring the view options add the dataheight option...
{ dataheight: 250, jqModal: false, closeOnEscape: true} // view options
这篇关于jqgrid-添加滚动条到长viewModel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!