Hello,
This can be achieved with two fields – one to accept the value and the another to show the label. The first field which will accept the value can be set to readonly and during showing the form it can be hidden (beforeShowForm).
In this case the logic of select can be changed to set the value of the first field and set the label of the second.
Do not forget to clear the value in first field if nothing is selected.
Here is a demo, but in php jqGrid
Another solution is to use a select2 plugin with custom defined field
Kind Regards,
Will
Guriddo Support Team
Hello,
We will see if this can be done and will replay.
In principle it can be implemented.
Kind Regards,
Will
Guriddo Support Team
Hello,
The header labels have a class ui-jqgrid-labels. So in case the grid has id jqGrid, to hide the labels row only do
|
1 2 3 |
... $(".ui-jqgrid-labels","#gbox_jqGrid").hide(): ... |
after the grid is created.
Kind Regards,
Will
Guriddo Support Team
Hello,
At the moment we do not see a way to integrate this pluginĀ in our Guriddo jqGrid.
Kind Regards,
Will
Guriddo Support Team
Hello,
Thank you for sharing your code.
Kind Regards,
Will
Guriddo Support Team
Hello,
You may get the next row id using this code sniplet.
|
1 2 3 4 5 6 7 |
var grid = $("#grid"); var selectedRow = grid.jqGrid('getGridParam','selrow'); var ids = grid.jqGrid('getDataIDs'); var index = grid.jqGrid('getInd',selectedRow); // next rowid is var nextid = ids[index + 1] |
Of course you should perform some filtering.
When you have this you can call editRow with this id, after saving the row using some events (see docs). Of course enclose this calling in setTimeout
Kind Regards,
Will
Guriddo Support Team
Hello,
In the current release this is supported, but very difficult. We have added a support for in operand in local searching.
This way it is easy to construct a cde. Here is a demo
Note that this feature is available only in GitHub.
Kind Regards
Will
Guriddo Support Team
Hello,
What is the datatype – (xml,json) or local?
Kind Regards,
Will
Guriddo Support Team
Hello,
Not sure if thei is the problem, but in your loop you use
$i, While you initialize $I. The PHP is case sensitive regarding variables
Try to output the contents in the loop.
ie print the result within loop
|
1 2 3 4 5 |
... $name = $file ['name'] [$i]; $size = $file ['size'] [$i]; $content = file_get_contents ($file ['tmp_name'] [$i]); var_dump($name, $size, $content); |
Kind Regards,
Will
Guriddo Support Team
Hello,
I re post the answer from stackoverflow.”
“This problem is fixed and will be available in the next release. If this is a showstopper for you can get the fixed code from GitHub.
UPDATE: The code used in loadComplete can be avoided if you just set responsive option in jqGrid set to true. I recommend you to to consult the documentation here
”
Kind Regards,
Will
Guriddo Support Team
Hello,
Before download, please clear the browser cache. Restart your PHP and Web Server
The new downloaded zip file should have today time stamp.
Try to install on different directory
Kind Regards,
Will
Guriddo Support Team
Hello,
Sorry for this inconvenience. We have fixed the problem. Please re download from the same location
Kind Regards,
Will
Guriddo Support Team
Hello,
I do not have idea why is this.
Note that all these fields should be in one table – demandes.
If the other fields are part from another table they will not be saved.
You can set a debug option in order to see what is happen:
|
1 2 |
... $form_formulaire->debug= true; |
A log file is created in this directory. Also in order this to be seen, please be a sure that the directory is writable.
Kind Regards,
Will
Guriddo Support Team
Hello,
For inline edit you can enable the editing, but make the field read-only like this
|
1 2 3 |
... {name:'some',... editable: true, editoptions: {disabled: true}...} ... |
Kind Regards,
Will
Guriddo Support Team
Hello,
If I understand correct the requirement you are close to the solution provided in previous post.
Actually you do not need to use setSelect. The code with the setSelect
|
1 2 3 4 5 |
... $grid->setColProperty('ref_RDV', array("label"=>"Ref RDV", "width"=>60, "editable"=>true,"align"=>"center", "classes"=>"wr", "editrules"=>array("required"=>false))); $grid->setSelect("ref_RDV", "SELECT ID_RDV,ID_RDV FROM drop_ref_rdv ORDER BY ID_RDV ASC",false,true,true); ... |
can be replaced with this one
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
$grid->setColProperty('ref_RDV', array("label"=>"Ref RDV", "width"=>60, "editable"=>true, "align"=>"center", "classes"=>"wr", "edittype"=>"select", "editoptions"=>array("dataUrl"=>"js:".$select), "editrules"=>array("required"=>false))); $select = <<<SELECT function(rowid, value, name) { var srow = jQuery("#grid0").jqGrid('getGridParam','selrow'); if(srow) { // get the row data based on the selected id var gridrow = jQuery("#grid").jqGrid('getRowData',srow); // pas it to the url return "select.php?num_ef="+gridrow.num_ef; } } SELECT; |
and the file select.php can have the following
|
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 |
require_once '../../jq-config.php'; // include the jqGrid Class require_once ABSPATH."php/PHPSuito/jqGridUtils.php"; // include the driver class require_once ABSPATH."php/PHPSuito/DBdrivers/jqGridPdo.php"; // Connection to the server $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); // Tell the db that we use utf-8 jqGridDB::query($conn,"SET NAMES utf8"); $numief = jqGridUtils::GetParam('num_ef'); // Get details $SQL = "SELECT ID_RDV,ID_RDV FROM drop_ref_rdv WHERE /*your where here/* ORDER BY ID_RDV ASC"; $qres = jqGridDB::query($conn, $SQL); // $result = jqGridDB::fetch_assoc($qres,$conn); $s = "<select>"; while($result = jqGridDB::fetch_assoc($qres,$conn) ) { $s .= "<option>".$result['ID_RDV'].'</option>'; } $s .= "</select>"; echo $s; jqGridDB::closeCursor($qres); &nbsp; |
Hope I understand correct the problem
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top