Ovi
Ovi

Reputation: 2559

jqgrid- add scroll bar to long viewModel

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

Upvotes: 0

Views: 1058

Answers (2)

Oleg
Oleg

Reputation: 221997

You tried the way described here and here.

Upvotes: 2

Ovi
Ovi

Reputation: 2559

Found the answer for this.

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

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

Upvotes: 0

Related Questions