Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/07/2009, 05:54
pabcue
 
Fecha de Ingreso: mayo-2006
Mensajes: 6
Antigüedad: 18 años, 7 meses
Puntos: 0
Problemas con jqgrid

Hola soy novato en jquery, y probando los ejemplos de jqgris, no consigo que me funcione, ¿pueden ayudarme?
El código del ejemplo que intento hacer funcionar es:

<html>
<head> <title>jqGrid Demo NAVGRID</title>
<link rel="stylesheet" type="text/css" media="screen" href="themes/sand/grid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/jqModal.css" />
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.jqGrid.js" type="text/javascript"></script>
<script src="js/jqModal.js" type="text/javascript"></script>
<script src="js/jqDnR.js" type="text/javascript"></script>
<script src="navgrid.js" type="text/javascript"> </script>

<script type="text/javascript"> jQuery(document).ready(function(){
jQuery("#editgrid").jqGrid({
url:'editing.php?q=1',
datatype: "xml",
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Closed','Ship via','Notes'],
colModel:[
{name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true ,size:10}},
{name:'invdate',index:'invdate', width:80,editable:true,editoptions:{size:10}},
{name:'name',index:'name', width:90,editable:true,editoptions:{size:25}},
{name:'amount',index:'amount', width:60, align:"right",editable:true,editoptions:{size:10}} ,
{name:'tax',index:'tax', width:60, align:"right",editable:true,editoptions:{size:10}} ,
{name:'total',index:'total', width:60,align:"right",editable:true,editoptions:{ size:10}},
{name:'closed',index:'closed',width:55,align:'cent er',editable:true,edittype:"checkbox",editoptions: {value:"Yes:No"}},
{name:'ship_via',index:'ship_via',width:70, editable: true,edittype:"select",editoptions:{value:"FE:FedE x;TN:TNT"}},
{name:'note',index:'note', width:100, sortable:false,editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}}
],
rowNum:10,
rowList:[10,20,30],
imgpath: 'themes/green/images',
pager: jQuery('#pagered'),
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption:"Editing Example",
editurl:"someurl.php"
});
$("#bedata").click(function(){
var gr = jQuery("#editgrid").getGridParam('selrow');
if( gr != null ) jQuery("#editgrid").editGridRow(gr,{height:280,rel oadAfterSubmit:false});
else alert("Please Select Row");
});
</script>
</head>
<body>
<table id="editgrid" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pagered" class="scroll" style="text-align:center;"></div>
</body>
</html>