Hello,
Please refer PDO guide what ? mean in SQL query.
Also you can read our documentation on passing parameters – see here.
Please try to simplicity the main grid – do not use conditional SQL and other conditions.
By default if the primary key is not set jqGrid set first field to be a primary key.
Please post your full source code of the subgrid again with the simple tablr dump
Regards,
Will
Guriddo Support Team
Hello,
Are you sure, that the code posted is your real code.
I do not see calling of setColModel. Without this it is impossible to run the grid.
I have mentioned some things, but you do not have try it.
1. Using get method try this;
|
1 2 3 |
$id = isset($USER->id) ? $USER->id : 0; $param = jqGridUtils::GetParam("jvs_user_id", $id); $grid->setUrl('grid_center.php?jvs_user_id='.$param); |
It seems to me that on the second call the USER->id does not exists.
What if you try to hardcode $param1 variable
Kind Regards,
Bill
Guriddo Support Team
Hello,
In all cases it is recommended to use
|
1 2 |
$grid->debug = true |
This way you can look in the jqGrid.log file in order to get information what is build and what is passed as parameters.
Some notes.
1. Using REQUEST array to get parameters is not recommended. Note that REQUEST try to obtain a session array too and there will be a problem.
You can use jqGrid utility method getParam . See docs.
2. First method seems to be fine except that it is not known if the parameters are passes.
3. You maybe read that when first time the jqGrid file is called it builds the grid and at second time the parameter should be saved either in the url variable or in post data.
4. Be a sure that in the second method the session variable exist.
You may refer to the old forum post here
Kind Regards,
Will
Guriddo Support Team
Hello,
If you look carefully into the editing example of subgrid (which you use as base) you will note that the primary key in subgrid differ from the parameter key in selectCommand.
You say that the cosmic key is unique in subgrid. If this is the case this mean that you can query only one record at a time and your model is many to one.
I recommend you to add additional auto increment key in subgrid table like by example curration_id. In this case the code can look like this:
|
1 2 3 4 5 6 7 |
$grid->SelectCommand = "select * from gene50_curation where cosmic = ?"; //echo $grid->SelectCommand; // set the ouput format to json $grid->dataType = 'json'; // set primary key $grid->setPrimaryKeyId('curration_id'); |
Kind Regards,
Will
Guriddo Support Team
Hello,
If you use a plugin that represent the spinner you will need to know the event which raises when a value is changed.
In all cases you will need to know the onchange event.
One possible solution is to use the dataInit event. Suppose the names in colModel are minspinner and maxspinner you can
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
colModel : [ ... { name:'minspinner', ...editoptions : { dataInit : function ( elem ) { $(elem).change(function() { // change the min value of maxspinner //$("#maxspinner").dosomething }); }, ... } ... |
Kind Regards,
Will
Guriddo Support Team
Hello,
The code you post does not explain the problem you have.
I think you will need to read more on passing parameters.
Please look at this forum post
Guriddo Support Team
Hello,
We have added a resizeColumn method in GitHub
You can download it from the GitHub build.
Please let us know if you encounter problems with this.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for the feedback and posting the solution.
Kind Regards,
Will
Guriddo Support Team
Hello,
We will add this method (or similar) in the base of the grid module.
We will let you know.
Thanks for sharing.
Kind Regards,
Will
Guriddo Support Team
Hello,
We have added a lot of events when expanding/collapsing a tree grid row.
The changes are available in git hub here . We have updated the build, so you can download this addition.
Note that it is possible not to expand/collapse row/node if the events in before action return false.
Please let us know if you have problems with this. If everthing is OK. we plan to add this requirement in our new Knowledge base
Kind Regards,
Will
Guriddo Support Team
… The problem with the above technique and on-demand loading is that we are unable to attach to “.tree-minus” and “.tree-plus” elements outside of an event that gets called every time a row is expanded (like jqGridAfterLoadComplete), resulting in the width adjustment function getting called multiple times for a single click and giving the wrong result.
…
This is exactly what we plan to do – to define a events when the plus or minus icons are clicked.
Kind Regards,
Will
Guriddo Support Team
Sorry for bad formatting. I’m not sure how you add a break with this editor.
Switch to visual mode (upper right corner) in order to put line breaks
Kind Regards,
Will
Guriddo Support Team
Hello
It is possible to define a custom checking function.
Please, visit our documentation page here
Check for the editrules, custom and custom_func. There is also example
Kind Regards,
Will
Guriddo Support Team
Hello Vladimir,
With the current implementation this is very difficult to be done.
This is very interesting feature and we will try to create the appropriate code for this Monday 27 April.
We will let you known.
Just to know – the column will be resized not automatically, but with a width defined from you – auto width is very difficult to be implemented.
Kind Regards,
Will
Guriddo Support Team
Hello,
The variables are explained as comments in form_conf.inc.php
$SERVER_HOST is a variable which describes the url addres of the host.
By example if you work loccaly this should be defined as:
$SERVER_HOST = "http://localhost/"
If the scripts are in haost named mydomain.com then this should be defined as
$SERVER_HOST = "http://mydomain.com/";
The $SELF_PATH describes the remaining url to the scripts i.e
$SELF_PATH = "suitophp/visualform/demo/";
With simple words – the combination of SERVER_HOST and SELF_PATH provides a url to the files where the project (or single file is run).
$CODE_PATH points to the physical path to the php files of Suito PHP.
In your case if the Suito is installed in /var/www/html/jqSuite482/
(suppose the directory structure is not chaged)
then the correct value is
$CODE_PATH = "/var/www/html/jqSuite482/php/PHPSuito/";
The same for $DRIVER_PATH
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top