Home › Forums › Guriddo jqGrid JS › Help › pager_left width is not set correctly
Tagged: pager left
Hello,
I'm having a weird issue. The pager, id=”pager_left” has a style assigned with a width of “66px;”.
I figured it out. It's because of the first column width and it being hidden.
tom
I actually have this happening on my grids since upgrading to 4.8! But although it is happening on some that have a hidden column it is happening on others that do not have a hidden column.
Is there an answer to this?
Hello,
Just for the case – can you please post a simple test case which demonstrates the problem.
We look seriously on every bug connected with the grid.
Thank you.
Kind Regards,
Will
Guriddo Support Team
Here are two pictures – the first with the paging in the centre of the pager bottom bar and second with the paging to the left. The effect is the icons for pdf export overlap the paging buttons. When you go to click on the PDF export you get the paging instead. The reason for this is the td#pager_left html tag as a style added to it of style=”width: xxxpx”. When it is working OK there is no style added – so not sure what determines there the style width is added or not?
Picture of wrong paging position
Picture of correct paging position
Here is very simple example code of the origin grid display that is not working properly…
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<?php $mode = ''; $type = ''; $query = ""; // Create tag query initial select statement fro all conditions $report_name = "Admin: Origins"; // Set heading description include 'include/tag_header.php'; ?> <div id="grid_div"> <!-- start of jquerygrid --> <?php $_SESSION['query_type']="origin_list"; $_SESSION['grid_query']='SELECT * FROM tag_origins where company_id = '.$_SESSION['company_id']; // $_SESSION['grid_query'] = "select ID, Name, Type, Location, GPS_long, GPS_lat, status from tags where Company = ".$_SESSION['company_id'].$com_list; include ('./services/jqgrid/admin/origin_list_grid.php'); ?> </div> <!--end of jquerygrid --> </form> </div><!--right panel End--> </div><!--Container End--> </div><!--wrapper End--> </body> </html> |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
<!--?php ini_set('display_errors', 'on'); error_reporting(E_ALL); if (!isset($_SESSION['grid_query'])) { session_start(); } $_SESSION['user_type']==3 ? $editable=false : $editable = true; include __DIR__ . '/../../../include/jq-config.php'; $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); $conn--->query("SET NAMES utf8"); // Create the jqGrid instance $conn->setAttribute( PDO::ATTR_EMULATE_PREPARES, false ); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $grid = new jqGridRender($conn); // Set the SQL Data source $grid->SelectCommand = $_SESSION['grid_query']; // passed by calling page // set the ouput format to json $grid->serialKey = true; $grid->setPrimaryKeyId('ID'); $grid->dataType = 'json'; // Let the grid create the model $grid->table = 'tag_origins'; // define the tabel used for deleting $grid->setColModel(); $grid->setUserDate("d-m-Y"); // set labels in the header /* Below will differ based on the type of report being executed*/ /* To be included so can set right columns settings for the query*/ $grid->exportfile = 'ZipNFC_tag_origins.xls'; $grid->setGridOptions(array( "rowNum"=>30, "rowList"=>array(10,20,30,50), "sortname"=>"Name", "sortorder"=>"ASC", "hoverrows"=>true, "toppager"=>true )); $grid->toolbarfilter = true; $grid->navigator = true; $grid->setNavOptions('navigator', array("excel"=>true,"pdf"=>true, "add"=>$editable,"edit"=>$editable,"del"=>false,"view"=>true,"cloneToTop"=>true)); $grid->setUrl("./services/jqgrid/admin/origin_list_grid.php"); $grid->setColProperty('ID', array("hidden"=>true)); $grid->setColProperty( 'company_id', array("hidden"=>true, "editoptions"=>array("defaultValue"=>$_SESSION['company_id']))); // End of bespoke JS function // Enjoy $grid->renderGrid('#grid','#pager',true, null, null, true,true); $conn = null; ?> |
Just for information this is old code that has been working perfectly on the last Trirand release that we use on our live systems…
Hello,
Sorry, but this example we can not reproduce the problem.
Usually this problem is happen if the parameter – pagerpos is set to left.
In this case the grid set the width of the column on which the pager buttons are set.
By example if the pagerpos is set to left we calculate the width of the left column
This of course is a problem.
We have put this in our bug list. Hope It will be fixed in the next release.
Thanks for reporting and have a nice weekends.
Kind Regards,
Will
Guriddo Support Team
Hello – Can you please point me in the right direction as to how I set pagerpos? I have tried to find in the docs, but cant find that parameter.
Happy to try this until you fix it.
As I said the latest Trirand release I use in live works perfectly with the exact same code I am using on your 4.8 release…
Have a nice weekend.
Hello,
Look here
See pagerpos parameter. The values can be center, left, right and it is a grid option (setGridOptions method).
Kind Regards,
Will
Guriddo Support Team
Hello – unfortunately I have tried that, but the pager is ignoring it and still moving to left and being overwritten by the pdf export etc. I implemented by changing as follows:
|
1 2 3 4 5 6 7 8 9 |
$grid->setGridOptions(array( "rowNum"=>30, "rowList"=>array(10,20,30,50), "sortname"=>"Name", "sortorder"=>"ASC", "hoverrows"=>true, "toppager"=>true, "pagerpos"=>center )); |
I can not use your latest version live as it messes up about 80% of my grids, so will probably wait not until this gets fixed. I am happy of the latest Trirand release as long as my license does not give up!
Hello,
Because we can not reproduce the problem, can you please prepare a separate example files which demostates the problem and send it to support at guriddo dot net.
Thank you
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top