jqgrid- add scroll bar to long viewModel

允我心安 提交于 2020-01-06 19:40:52

问题


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...


回答1:


You tried the way described here and here.




回答2:


Found the answer for this.

When declaring the view options add the dataheight option...

{ dataheight: 250, jqModal: false, closeOnEscape: true} // view options


来源:https://stackoverflow.com/questions/8891535/jqgrid-add-scroll-bar-to-long-viewmodel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!