Foros del Web » Programando para Internet » Javascript » Frameworks JS »

jqgrid

Estas en el tema de jqgrid en el foro de Frameworks JS en Foros del Web. hola, estoy comenzando a utilizar jqgrid para mostrar los datos de una base de datos, ahora bien lo que todavia no se como implementar son ...
  #1 (permalink)  
Antiguo 25/10/2011, 21:46
 
Fecha de Ingreso: octubre-2011
Mensajes: 14
Antigüedad: 12 años, 6 meses
Puntos: 0
jqgrid

hola, estoy comenzando a utilizar jqgrid para mostrar los datos de una base de datos, ahora bien lo que todavia no se como implementar son los botones de edicion, el de agregar y el de eliminar, los defino que salgan en el navgrid, pero no el de agregar me sale un cuadro vacion, y no se como mandar los datos a mi servlet.

este es el codigo de mi jqgrid

Código Javascript:
Ver original
  1. function fillGridOnEvent(){
  2.                     $("#jQGrid").html("<table id=\"list\"></table><div id=\"page\"></div>");
  3.                     jQuery("#list").jqGrid({
  4.                         url:'<%=request.getContextPath()%>/TablaProductoServlet?q=1&action=fetchData',
  5.                         datatype: "xml",
  6.                         height: 250,
  7.                         colNames:['No Producto.','Codigo','Nombre ','Precio V','Precio C','Stok','Cat','Descripcion',"Action"],
  8.                         colModel:[
  9.                             {name:'NP',index:'NP', width:40,sortable:true, editable:false, editoptions:{width:20} },
  10.                             {name:'CP',index:'CP', width:50,sortable:false, editable:true, editoptions:{width:20}},
  11.                             {name:'NOP',index:'NOP', width:190,sortable:false, editable:true, editoptions:{width:20}},
  12.                             {name:'PPV',index:'PPV', width:50,sortable:false, editable:true, editoptions:{width:20}},
  13.                             {name:'PPC',index:'PPC', width:50,sortable:false, editable:true, editoptions:{width:20}},
  14.                             {name:'PS',index:'PS', width:30,sortable:false, editable:true, editoptions:{width:20}},
  15.                             {name:'PNC',index:'PNC', width:30,sortable:false, editable: true,edittype:"select",editoptions:{value:"1:1;2:2"}},
  16.                             {name:'PD',index:'PD', width:100,sortable:false, editable:true, editoptions:{width:20}},
  17.                             {name:'view',index:'view', width:50,sortable:false}
  18.                         ],
  19.                         multiselect: false,
  20.                         paging: true,
  21.                         rowNum:10,
  22.                         rowList:[10,20,30],
  23.                         pager: $("#page"),
  24.                         loadonce:true,
  25.                        
  26.                         viewrecords: true,
  27.                         height: "100%",
  28.                         caption: "Student Details"
  29.                            
  30.                     }).navGrid('#page',{edit:true,add:true,del:true});  
  31.                 }
  32.                 jQuery().ready(function (){
  33.                     //fillGrid();
  34.                 });

agradeceria un ejemplo de como definir las otras funciones.

Etiquetas: funcion, html, jqgrid, jquery
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:54.