Hi, firstly congratulation for the plugin and the community.
I am using Codeigniter 1.7.2 and jqGrid, but I have a problem. I also say that after reading the wiki again and again I have not been able to find a solution for my json data. The respond that I get is OK, using Firebug is the following:
POST:
| _search | false |
| nd | 1260940642625 |
| page | 1 |
| rows | 20 |
| sidx | idpieza |
| sord | desc |
RESPOND:
|
1 |
[{"idpieza":"1","descripcion":"Primera pieza de mi vida",<br />"fechaAlta":"2008-12-31 23:59:59","fechaMod"</code><code>:"2009-01-31 23:59:59",<br />"vista":"1","vertical":"0","width":"500","height":"400","top":"10",<br />"left":"20"</code><code>,"color":"blue","background":"#efefef","border":"4px solid #A9A9A9",<br />"bloque_background":"#fff","usuario"</code><code>:"0"},{"idpieza":"2","descripcion":"Segundona",<br />"fechaAlta":"2009-02-27 23:59:59","fechaMod":"2009-11-06</code><code> 23:59:59","vista":"1",<br />"vertical":"1","width":"600","height":"600","top":"500","left":"300","color":"red"</code><code>,<br />"background":"white","border":"1px solid green","bloque_background":"white","usuario":"0"},........<br /><br />CODE:<br /><br /> jQuery("#lista").jqGrid({<br /> ajaxGridOptions : {type:"POST"},<br /> serializeGridData : function(postdata) {<br /> postdata.page = 1;<br /> return postdata;<br /> },<br /> url:'piezas/cristina',<br /> datatype: "json",<br /> colNames:['ID','Descripcion', 'fechaAlta', 'fechaMod','vista','Vertical','width',<br /> 'height','top','left','color','background','border','bloque_background'],<br /> colModel:[<br /> {name:'idpieza',index:'idpieza', width:55},<br /> {name:'descripcion',index:'descripcion', width:90},<br /> {name:'fechaAlta',index:'fechaAlta', width:100},<br /> {name:'fechaMod',index:'fechaMod', width:80, align:"right"},<br /> {name:'vista',index:'vista', width:80, align:"right"},<br /> {name:'vertical',index:'vertical', width:80,align:"right"},<br /> {name:'width',index:'width', width:150, sortable:false},<br /> {name:'height',index:'height', width:150, sortable:false},<br /> {name:'top',index:'top', width:150, sortable:false},<br /> {name:'left',index:'left', width:150, sortable:false},<br /> {name:'color',index:'color', width:150, sortable:false},<br /> {name:'background',index:'background', width:150, sortable:false},<br /> {name:'border',index:'border', width:150, sortable:false},<br /> {name:'bloque_background',index:'bloque_background', width:150, sortable:false}<br /> ],<br /> rowNum:20,<br /> width:900,<br /> rowList:[10,20,30],<br /> pager: '#paginacion',<br /> sortname: 'idpieza',<br /> viewrecords: true,<br /> sortorder: "desc",<br /> caption:"Piezas registradas en el sistema por el usuario"<br /> });<br /> jQuery("#pjqgajax").jqGrid('navGrid','#pjqgajax',{edit:false,add:false,del:false});<br /><br /><br /><br /> |
>I know that maybe this json is not available for jqGrid, but i am trying all possibilities. I tried different versions of the jsonReader but not successfully.
So if something is wrong, can anybody help me?
Thanks indeed.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top