Hello
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 ?.
You can put this css on page after including css files.
<style>
/* 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; }
</style>
Hi, works perfectly.
Can you tell me where i can adjust the rows with different colors.
example:
yellow
blue
yellow
blue
yellow
usw….
Enable alternate rows option, and add this css:
$opt["altRows"] = true;
$opt["altclass"] = "myAltRowClass";
$g->set_options($opt);
and in html …
<style>
/* 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; }
</style>
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?
You can connect loadComplete event and in JS callback, you can call setSelection function to select desired row id.
$grid["loadComplete"] = "function(){ do_onload(); }";
$g->set_options($grid);
To select / unselect grid row, e.g. rowid 5
jQuery('#list1').jqGrid('setSelection', 5, true);
You can replace 5 with <?php echo $_GET["param"] ?>