row height

Questionsrow height
Sascha asked 7 years ago


where can I change the row height?
The height should be 15px. But it is only 25px.
I took this order.

$col["formatter"] = "function(cellval,options,rowdata){ return '<div style="height:15px; overflow:hidden;">'+cellval+'</div>'; }";

Can someone tell me how I managed it is the rows 15px high ?.

5 Answers
Abu Ghufran answered 7 years ago

You can put this css on page after including css files.

/* increase font & row height */
.ui-jqgrid *, .ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-size:10px; }
.ui-jqgrid tr.jqgrow td { height:15px; }

Sascha answered 7 years ago

Hi, works perfectly.

Can you tell me where i can adjust the rows with different colors.




Abu Ghufran answered 7 years ago

Enable alternate rows option, and add this css:

$opt["altRows"] = true;
$opt["altclass"] = "myAltRowClass";

and in html …

/* base row color */
.ui-jqgrid tr.jqgrow { background-color: yellow; background-image: url('') !important; }

/* alternate row color */
.myAltRowClass { background-color: blue !important; background-image: url('') !important; }

Sascha answered 7 years ago

It works very fine.

I open the phpgrid over a link, I can give the link parameter, so that when opening the phpgrid is already made a preselection?

Abu Ghufran answered 7 years ago

You can connect loadComplete event and in JS callback, you can call setSelection function to select desired row id.

$grid["loadComplete"] = "function(){ do_onload(); }";

To select / unselect grid row, e.g. rowid 5
jQuery('#list1').jqGrid('setSelection', 5, true);

You can replace 5 with <?php echo $_GET["param"] ?>

Your Answer

11 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?