<?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: Problems mit dynamic Edit Fields</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields</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/problems-mit-dynamic-edit-fields/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>patrick on Problems mit dynamic Edit Fields</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10612</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10612</guid>
        	        	<description><![CDATA[<p>thx, will try it.</p>
]]></description>
        	        	<pubDate>Fri, 09 Oct 2009 13:33:46 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Problems mit dynamic Edit Fields</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10588</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10588</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>What I do in my apps is quite easy, but requiere to use in the readers - repeatitems:false.</p>
<p>In this case you can define the second password in colModel and show or hide it depending on the conditions.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 09 Oct 2009 04:06:25 +0300</pubDate>
        </item>
        <item>
        	<title>Patrick on Problems mit dynamic Edit Fields</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10556</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problems-mit-dynamic-edit-fields#p10556</guid>
        	        	<description><![CDATA[<p>Hi all,</p>
<p>i want to dynamically add a second password field to the edit window. Problem is, that the field is set to the end of the table and marked "hidden". Any clues?</p>
<p>Thx in advance.</p>
</p>
<p>Tried this code:</p>
<blockquote>
<p><span style="color: #0000ff;">jQuery(&#8221;#userTable&#8221;).jqGrid({ <br />&#160;&#160;&#160; &#160;&#160;&#160; url: _gridUrl, <br />&#160;&#160;&#160; &#160;&#160;&#160; datatype: _datatype, <br />&#160;&#160;&#160; &#160;&#160;&#160; colNames:[&#39;ID&#39;,&#39;Account-Name&#39;,&#39;Passwort&#39;,&#39;Nachname&#39;,&#39;Vorname&#39;,&#39;Strasse&#39;,&#39;PLZ&#39;,&#39;Ort&#39;,&#39;Telefon&#39;,&#39;Fax&#39;,&#39;email&#39;,&#39;inaktiv&#39;], <br />&#160;&#160;&#160; &#160;&#160;&#160; colModel:[ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:67, align:"center"},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;name&#39;,index:&#39;name&#39;, editable: true, width:120, editrules:{required:true}},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;password&#39;,index:&#39;password&#39;, editable: true, edittype:&#39;password&#39;, hidden: true, editrules:{required:true, edithidden: true}},&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Nachname&#39;,index:&#39;Nachname&#39;, width:100, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Vorname&#39;,index:&#39;Vorname&#39;, width:100, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Strasse&#39;,index:&#39;Strasse&#39;, width:100, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;PLZ&#39;,index:&#39;PLZ&#39;, width:67, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Ort&#39;,index:&#39;Ort&#39;, width:100, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Telefon&#39;,index:&#39;Telefon&#39;, width:67, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Fax&#39;,index:&#39;Fax&#39;, width:67, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Email&#39;,index:&#39;Email&#39;, width:67, editable: true},<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;inaktiv&#39;,index:&#39;inactive&#39;, width:67, align:"center", editable: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; edittype:&#39;checkbox&#39;, formatter:&#39;checkbox&#39;, editoptions: {value:"1:0"}}<br />&#160;&#160;&#160; &#160;&#160;&#160; ], <br />&#160;&#160;&#160; &#160;&#160;&#160; pager: jQuery(&#39;#userPagernav&#39;),<br />&#160;&#160;&#160; &#160;&#160;&#160; width: 500,<br />&#160;&#160;&#160; &#160;&#160;&#160; height: 259,<br />&#160;&#160;&#160; &#160;&#160;&#160; recordpos: &#39;center&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; pagerpos: &#39;hidden&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; shrinkToFit: false, <br />&#160;&#160;&#160; &#160;&#160;&#160; gridview: true, <br />&#160;&#160;&#160; &#160;&#160;&#160; sortname: &#39;id&#39;, <br />&#160;&#160;&#160; &#160;&#160;&#160; viewrecords: true, <br />&#160;&#160;&#160; &#160;&#160;&#160; sortorder: &#8220;asc&#8221;, <br />&#160;&#160;&#160; &#160;&#160;&#160; multiselect: false,<br />&#160;&#160;&#160; &#160;&#160;&#160; onsetselection: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; scrollrows: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; viewsortcols: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; rownumbers: true,<br />&#160;&#160;&#160; &#160;&#160;&#160; rowNum: 99999999,<br />&#160;&#160;&#160; &#160;&#160;&#160; loadui: &#39;block&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; gridComplete: function(id) <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; gridComplete();<br />&#160;&#160;&#160; &#160;&#160;&#160; },<br />&#160;&#160;&#160; &#160;&#160;&#160; onSelectRow: function(id) <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; setCookies();<br />&#160;&#160;&#160; &#160;&#160;&#160; },<br />&#160;&#160;&#160; &#160;&#160;&#160; onSortCol: function(id) <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; sort_change = true;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; setCookies();<br />&#160;&#160;&#160; &#160;&#160;&#160; },<br />&#160;&#160;&#160; &#160;&#160;&#160; editurl:&#8221;files/ajax/reqUserUpdate.php&#8221;<br />&#160;&#160;&#160; }).navGrid(&#39;#userPagernav&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; edit:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; add:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; search:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; del:false,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; refresh:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; addtitle: &#8220;Neuen &#8221; + gridName + &#8221; anlegen&#8221;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; edittitle: &#8220;Ausgewaehlten &#8221; + gridName + &#8221; editieren&#8221;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; searchtitle: gridName + &#8221; finden&#8221;<br />&#160;&#160;&#160; &#160;&#160;&#160; }, //options <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; height:320,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; width:500,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; reloadAfterSubmit:true,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; editCaption: gridName + &#8221; editieren&#8221;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;<span style="color: #339966;">&#160;</span><span style="color: #339966;"> beforeShowForm: function(formid) {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var my_field_pos = $(&#8221;#password&#8221;,formid).parent(&#8221;tr:first&#8221;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var elm = &#8220;&#60;tr class=&#39;FormData&#39;&#62;&#60;td class=&#39;CaptionTD ui-widget-content&#39;&#62;MyCaption&#60;/td&#62;&#60;td class=&#39;DataTD ui-widget-content&#39;&#62;&#60;input class=&#39;FormElement&#39;/&#62;&#60;/td&#62;&#60;/tr&#62;&#8221;;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; $(my_field_pos).after(elm);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</span><br />&#160;&#160;&#160; &#160;&#160;&#160; }, // edit options <br />&#160;&#160;&#160; &#160;&#160;&#160; {height:320, width:500, reloadAfterSubmit:true, addCaption: gridName + &#8221; hinzufuegen&#8221;}, // add options <br />&#160;&#160;&#160; &#160;&#160;&#160; {reloadAfterSubmit:false}, // del options <br />&#160;&#160;&#160; &#160;&#160;&#160; {} // search options<br />&#160;&#160;&#160; );</span></p>
</p>
</blockquote>
<p><span class="nodeLabelBox repTarget ">Generated code looks like this:</span></p>
<blockquote>
<p><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">tr</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">id</span>=&#8221;<span class="nodeValue editable ">tr_Telefon</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">FormData</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">rowpos</span>=&#8221;<span class="nodeValue editable ">8</span>&#8220;</span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></p>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tr</span>&#62;</span></span></div>
<div class="nodeBox containerNodeBox  repIgnore ">
<div class="nodeLabel "><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">tr</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">id</span>=&#8221;<span class="nodeValue editable ">tr_Fax</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">FormData</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">rowpos</span>=&#8221;<span class="nodeValue editable ">9</span>&#8220;</span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></div>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tr</span>&#62;</span></span></div>
</div>
<div class="nodeBox containerNodeBox  repIgnore ">
<div class="nodeLabel "><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">tr</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">id</span>=&#8221;<span class="nodeValue editable ">tr_Email</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">FormData</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">rowpos</span>=&#8221;<span class="nodeValue editable ">10</span>&#8220;</span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></div>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tr</span>&#62;</span></span></div>
</div>
<div class="nodeBox containerNodeBox  repIgnore ">
<div class="nodeLabel "><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">tr</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">id</span>=&#8221;<span class="nodeValue editable ">tr_inaktiv</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">FormData</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">rowpos</span>=&#8221;<span class="nodeValue editable ">11</span>&#8220;</span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></div>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tr</span>&#62;</span></span></div>
</div>
<div class="nodeBox containerNodeBox nodeHidden repIgnore  open">
<div class="nodeLabel "><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">tr</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">FormData</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span style="color: #ff0000;"><span class="nodeName editable ">style</span>=&#8221;<span class="nodeValue editable ">display: none;</span>&#8220;</span></span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></div>
<div class="nodeChildBox ">
<div class="nodeBox emptyNodeBox nodeHidden repIgnore ">
<div class="nodeLabel " style="padding-left: 30px;"><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">td</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">CaptionTD</span>&#8220;</span><span class="nodeBracket editable insertBefore ">/&#62;</span></span></span></div>
</div>
<div class="nodeBox containerNodeBox nodeHidden repIgnore ">
<div class="nodeLabel " style="padding-left: 30px;"><span style="color: #0000ff;"><span class="nodeLabelBox repTarget ">&#60;<span class="nodeTag ">td</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">class</span>=&#8221;<span class="nodeValue editable ">DataTD</span>&#8220;</span><span class="nodeAttr editGroup ">&#160;<span class="nodeName editable ">colspan</span>=&#8221;<span class="nodeValue editable ">1</span>&#8220;</span><span class="nodeBracket editable insertBefore ">&#62;</span></span></span></div>
<div class="nodeCloseLabel " style="padding-left: 30px;"><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">td</span>&#62;</span></span></div>
</div>
</div>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tr</span>&#62;</span></span></div>
</div>
<div class="nodeCloseLabel "><span style="color: #0000ff;"><span class="nodeCloseLabelBox repTarget ">&#60;/<span class="nodeTag ">tbody</span>&#62;</span></span></div>
</blockquote>
]]></description>
        	        	<pubDate>Thu, 08 Oct 2009 06:50:15 +0300</pubDate>
        </item>
</channel>
</rss>