Hello,
Thank you for the feedback and solution provided.
Kind Regards,
Will
Guriddo Support Team
Hello,
It seems you make a wrong combination.
To note when you set the parameter with grid options you will need to use postData.
Bellow is the full source code without using postData, but setUrl, which you should do in order this to work. Please note the use of setUrl parameter
|
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 |
<!--?php include_once 'jq-config.php'; // include the jqGrid Class require_once '../javascript/jqgrid/php/jqGrid.php'; // include the PDO driver class require_once '../javascript/jqgrid/php/jqGridPdo.php'; if(!isset($TestID) ) { $TestID = jqGridUtils::GetParam('id', ''); } $id = $TestID; // Connection to the server $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); // Create the jqGrid instance $grid = new jqGridRender($conn); // setUrl $grid->setUrl('getTestQuestionsFO.php?id='.$TestID); // the actual query for the grid data $grid->SelectCommand = "SELECT tr_cyotestquestion.TestID, tr_cyotestquestion.FixedOrder, tr_cyoquestion.Title, tr_cyoquestion.CYOQuestionID FROM tr_cyoquestion INNER JOIN tr_cyotestquestion ON tr_cyotestquestion.CYOQuestionID = tr_cyoquestion.CYOQuestionID WHERE tr_cyotestquestion.FixedOrder IS NOT NULL and tr_cyotestquestion.TestID = ".$id; |
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the good question.
To do what you want you will need to disable using jqModal, which is done when this parameter is set to false.
Currently there is a small problem with this combibnation and the overlay, so the solution is with the following code
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<div id="search_layer"></div> jQuery("#allsitesgrid").jqGrid('navGrid','#allsitesgridnav', {search:true, add:false,edit:false,del:false, searchtext: 'Filter'}, //options {}, // edit options {}, // add options {}, // del options { overlay: 0, layer: 'search_layer', jqModal : false, afterShowSearch : function() { $(".jqgrid-overlay").hide(); } } // search options ); |
Kind Regards,
Will
Guriddo Support Team
Hello,
The code
|
1 2 3 |
if(!isset($TestID) ) { $TestID = jqGridUtils::GetParam($TestID); } |
does not correspond to
|
1 2 3 |
$grid->setUrl(‘getTestQuestionsFO.php?id=’.$TestID); .. |
Replace
|
1 2 3 |
if(!isset($TestID) ) { $TestID = jqGridUtils::GetParam($TestID); } |
with
|
1 2 3 |
if(!isset($TestID) ) { $TestID = jqGridUtils::GetParam('id'); } |
TestID is variable, while id you set in the url is parameter.
Kind Regards,
Will
Guriddo Support Team
Hello,
As you correctly mentioned we do two pass – one for creation of the grid script and the another to obtain the data. If the grid file is included in a index file which contain some variables used, then these variabls does not exists when a second call is made.
To overcome this problem you can set these variables to be passed throught the grid url (using the options of the grid) below is a possible solution of the problem:
|
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 |
include_once 'jq-config.php'; // include the jqGrid Class require_once "../javascript/jqgrid/php/jqGrid.php"; // include the PDO driver class require_once “../javascript/jqgrid/php/jqGridPdo.php”; if(!isset($TestID) ) { $TestID = jqGridUtils::GetParam('MyParam','Deafult_Value'); } $id = $TestID; // Connection to the server $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); // Create the jqGrid instance $grid = new jqGridRender($conn); // options $grid->setGridOptions(array("postData"=>array("MyParam"=>$TestID))); // the actual query for the grid data $grid->SelectCommand = "SELECT tr_cyotestquestion.TestID, tr_cyotestquestion.FixedOrder, tr_cyoquestion.Title, tr_cyoquestion.CYOQuestionID FROM tr_cyoquestion INNER JOIN tr_cyotestquestion ON tr_cyotestquestion.CYOQuestionID = tr_cyoquestion.CYOQuestionID WHERE tr_cyotestquestion.FixedOrder IS NOT NULL and tr_cyotestquestion.TestID = ".$id; ... |
or add MyParam to the grid url
|
1 2 |
$grid->setUrl("grid.php?MyParam=".$TestID); ... |
Hope this helps
Kind Regards,
WIll
Guriddo Support Team
Hello,
Sorry for the wrong command provided. Instead of destroy a unload function should be used – i.e replace
|
1 2 |
$.jgrid.gridDestroy( grid ); ... |
with
|
1 2 |
$.jgrid.gridUnload( grid ); ... |
Below is a demo
Guriddo Support Team
Hello,
You have a e-mail.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all thank you very much for the test case and demo and that you find these problems.
1.Currently there is a problem when rowTotal is set to true. We will try to fix this ASAP. In order to achieve what you want temporary set this parameter to false – i.e:
|
1 2 3 4 |
$pivot->setPivotOptions(array( "rowTotals" => false, "colTotals" => true )); |
2. The code for the buttons in pivot is fixed in JavaScript in GitHub. If you have difficulties to get it, please let us know
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for reporting this problem.
We will try to fix the problem during this week and we will let you know.
Kind Regards,
Will
Guriddo Support Team
Hello,
We have develop a new method exportToHtml with ability to print. If you are interested you ca get this new feature from GitHub.
Kind Regards,
Will
Guriddo Support Team
Hello,
In your example when use setTimeout it is working. Anyway we will document this behavior in our docs.
Thank you again for your feedback
Kind Regards
Will
Guriddo Support Team
Thanks for the example.
We always ask for the demo, since we where not able to reproduce at our end.
Now with your example it is clear – this is not a bug, but a way the setRegional works.
In order this to work you will need to enclose the setRegional in setTimeout function immediate after reloading the grid (100 ms is enough) .
We will describe in the docs that when calling after reloading the grid setRegional should be enclosed in setTimeout.
Thank you very much for your investigations and recommendations.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you very much for the feedback and investigations.
Could you please prepare a simple demo or sequence of functions calling which demonstrates the problem and send it to us.?
Thank you in advance.
Kind Regards,
Will
Guriddo Support Team
We will try to reproduce the proble, but could you please send to us a small working example, which demonstrates the problem.
Also which version of the JavaScript is used?
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the example and the test case.
One possible reason for this is that you have update the jqGrid file, but not the language file (grid.locale-en.js by example). Be a sure that this file is upgraded too.
Try to clear your browser cache reload all the needed files and try.
Do not have any other idea.
If possible install the non minified version jquery.jqGrid.js and try to debug the code using a javascript debugger, but this maybe will be very hard to do.
Kind Regards,
WIll
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top