<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: help with the editing of records</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-the-editing-of-records</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/help-with-the-editing-of-records/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jarcho on help with the editing of records</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/help-with-the-editing-of-records#p25000</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/help-with-the-editing-of-records#p25000</guid>
        	        	<description><![CDATA[<p>Tengo lo siguiente:</p>
<p>&#160;&#160;&#160; var grilla=jQuery("#listado_es").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;height: 200,<br />&#160;&#160; &#160;&#160;&#160; &#160;url:&#39;mod_list_e_s/reges_detalle.php?q=1&#38;id=0&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;datatype: "xml",<br />&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;Fecha Entrada&#39;,&#39;Fecha Salida&#39;, &#39;Dependencia&#39;, &#39;Puerta Entrada&#39;,&#39;Donde Va?&#39;,&#39;Pta Entrada&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;colModel:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;horaent&#39;,index:&#39;horaent&#39;,width:130,editable:true,editoptions:{size:25},searchtype:"datetime",sorttype:"datetime" },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;horasal&#39;,index:&#39;horasal&#39;,width:130,editable:true,editoptions:{size:25},searchtype:"datetime",sorttype:"datetime" },</p>
</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;nom_dep&#39;,index:&#39;nom_dep&#39;, width:200},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;pta_ent&#39;,index:&#39;pta_ent&#39;, width:200},</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; //codigos relacionados (campos tipo select)<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; {name:&#39;cod_dep&#39;,index:&#39;cod_dep&#39;, width:1,editable:true,edittype:"select", editoptions:{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;dataUrl:&#39;dependencias.php&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}},</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;cdpta_ent&#39;,index:&#39;cdpta_ent&#39;, width:1,editable:true,edittype:"select", editoptions:{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;dataUrl:&#39;text_datos.php&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}},</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;rowList:[5,10,20],<br />&#160;&#160; &#160;&#160;&#160; &#160;pager: &#39;#pager_es&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;sortname: &#39;horaent&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;sortorder: "asc",<br />&#160;&#160; &#160;&#160;&#160; &#160;editurl:&#39;mod_list_e_s/opera.php&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;caption:"Resgistro de entradas y salidas para: "<br />&#160;&#160; &#160;})<br />&#160;&#160; &#160;jQuery("#listado_es").jqGrid(&#39;hideCol&#39;,["cod_dep","cdpta_ent"]);<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;jQuery("#listado_es").jqGrid(&#39;navGrid&#39;,&#39;#pager_es&#39;,{add:false,edit:false,del:false}, {}, {}, {}, {multipleSearch:true});</p>
<p>grilla.navButtonAdd(&#39;#pager_es&#39;,{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption:"Editar", <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; buttonicon : &#39;ui-icon-pencil&#39;, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; title:&#39;Editar&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; onClickButton: function(){ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var gr = jQuery("#listado_es").getGridParam("selrow"); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if( gr != null ) { <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#listado_es").jqGrid(&#39;editGridRow&#39;,gr,{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;reloadAfterSubmit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;modal:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;closeAfterEdit:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;afterSubmit:function(xhr,postdata){ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rta=xhr.responseText;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(rta&#62;=0) <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return [true] <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;else<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return [false,rta]<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }else{ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;alert("Seleccione un registro para editar!"); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; }; <br />&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160; &#160;&#160;&#160; &#160; position:"last"&#160;&#160; &#160;<br />});</p>
</p>
<p>Lo que nesecito es que a la hora de editar me aparesca los dos campos que los oculte en un principio,&#160; por que estos son codigos que se relacionan desde otra tabla y no deseo mostarlos; solo mustro los nombres; pero si quiero tener la posibilidad de editarlos....</p>
<p>Como lo hago?&#160; <img class="spSmiley" style="margin:0" title="Cool" src="/blog/wp-content/forum-smileys/sf-cool.gif" alt="Cool" /><img class="spSmiley" style="margin:0" title="Cool" src="/blog/wp-content/forum-smileys/sf-cool.gif" alt="Cool" /><img class="spSmiley" style="margin:0" title="Confused" src="/blog/wp-content/forum-smileys/sf-confused.gif" alt="Confused" /></p></p>
]]></description>
        	        	<pubDate>Thu, 27 Oct 2011 17:52:36 +0300</pubDate>
        </item>
</channel>
</rss>