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.
Â
|
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 47 |
<?php<br /> require_once 'jq-config.php';<br /> // include the jqGrid Class<br /> require_once "php/jqGrid.php";<br /> // include the PDO driver class<br /> require_once "php/jqGridPdo.php";<br /> // Connection to the server<br /> $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);<br /> <br /> // Create the jqGrid instance<br /> $grid = new jqGridRender($conn);<br /> // Write the SQL Query<br /> // We suppose that mytable exists in your database<br /> $grid->SelectCommand = "SELECT CONCAT(C.nombre,' ',C.apellido ) AS Nombre, G.Observacion, T.nombre Topico,<br /> If(G.Prioridad = 1, 'Alta',If( G.Prioridad = 2, 'Media','Baja')) Prioridad,<br /> O.nombre Output, G.Fecha_Gap, G.Fecha_Cierre<br /> FROM Colaboradores C, Gaps G, Topicos T, Outputs O<br /> WHERE C.id = G.id_colaborador<br /> AND T.id = G.id_topico<br /> AND O.id = G.id_output";<br /> <br /> // set the ouput format to json<br /> $grid->dataType = 'json';<br /> // Let the grid create the model<br /> $grid->setColModel();<br /> // Set the url from where we obtain the data<br /> $grid->setUrl('myfirstgrid.php');<br /> // Set grid caption using the option caption<br /> $grid->setGridOptions(array(<br /> "caption"=>"GAP's De Auditoria Contabilidad y Finanzas",<br /> "rowNum"=>10,<br /> "sortname"=>"C.nombre",<br /> "rowList"=>array(10,20,50)<br /> ));<br /> <br /> // Change some property of the field(s)<br /> $grid->setColProperty("Nombre", array("width"=>"600"));<br /> $grid->setColProperty("Observacion", array("width"=>"1200"));<br /> $grid->setColProperty("Topico", array("width"=>"300"));<br /> $grid->setColProperty("Prioridad", array("width"=>"300"));<br /> $grid->setColProperty("Output", array("width"=>"300"));<br /> $grid->setColProperty("Fecha_Gap", array("width"=>"300"));<br /> $grid->setColProperty("Fecha_Cierre", array("width"=>"300"));<br /> <br /><br /> // Run the script<br /> $grid->renderGrid('#grid','#pager',true, null, null, true,true);<br /> ?> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top