Forum
01:02
07/11/2014
Dear, good afternoon.
The question is pretty simple, but I've gone around the page Trirand but I could not find a way how to make the grid bigger.
Currently, I have a grid with jqGrid with Php but I fail to make the grid bigger, I've managed to make the columns bigger but not the grid
I know the question is novice, but haven't found it. I hope you can help me.
I also show them my php code, to see what I'm doing.
Â
<?php require_once 'jq-config.php'; // include the jqGrid Class require_once "php/jqGrid.php"; // include the PDO driver class require_once "php/jqGridPdo.php"; // Connection to the server $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD); // Create the jqGrid instance $grid = new jqGridRender($conn); // Write the SQL Query // We suppose that mytable exists in your database $grid->SelectCommand = "SELECT CONCAT(C.nombre,' ',C.apellido ) AS Nombre, G.Observacion, T.nombre Topico, If(G.Prioridad = 1, 'Alta',If( G.Prioridad = 2, 'Media','Baja')) Prioridad, O.nombre Output, G.Fecha_Gap, G.Fecha_Cierre FROM Colaboradores C, Gaps G, Topicos T, Outputs O WHERE C.id = G.id_colaborador AND T.id = G.id_topico AND O.id = G.id_output"; // set the ouput format to json $grid->dataType = 'json'; // Let the grid create the model $grid->setColModel(); // Set the url from where we obtain the data $grid->setUrl('myfirstgrid.php'); // Set grid caption using the option caption $grid->setGridOptions(array( "caption"=>"GAP's De Auditoria Contabilidad y Finanzas", "rowNum"=>10, "sortname"=>"C.nombre", "rowList"=>array(10,20,50) )); // Change some property of the field(s) $grid->setColProperty("Nombre", array("width"=>"600")); $grid->setColProperty("Observacion", array("width"=>"1200")); $grid->setColProperty("Topico", array("width"=>"300")); $grid->setColProperty("Prioridad", array("width"=>"300")); $grid->setColProperty("Output", array("width"=>"300")); $grid->setColProperty("Fecha_Gap", array("width"=>"300")); $grid->setColProperty("Fecha_Cierre", array("width"=>"300")); // Run the script $grid->renderGrid('#grid','#pager',true, null, null, true,true); ?>
16:35
Moderators
30/10/2007
Hello,
Â
Take a look of the shrinkToFit option and width option of the grid.
Â
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
33 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66