<?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: Customizing Form in Modal Dialog</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog</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/customizing-form-in-modal-dialog/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>andrewwatts on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p12154</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p12154</guid>
        	        	<description><![CDATA[<p>Thanks Tony,</p>
<p>I&#39;m definitely eager to try that out, is there a formal means of making a custom template request for 3.7, or is this thread good enough?</p>
<p>In the meantime I&#39;ve decided that using something like the master detail example would work best in the interim.</p>
<p>Thanks again, I&#39;m really enjoying the library, it&#39;s saving me a ton of time.</p>
<p>- Andrew</p></p>
]]></description>
        	        	<pubDate>Thu, 19 Nov 2009 00:15:19 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p12051</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p12051</guid>
        	        	<description><![CDATA[<p>Hello Andrew,</p>
<p>Thanks for this. I too think about this. Yes template is one good solution and I think it can be realized. Will be a job for 3.7 release.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 17 Nov 2009 02:45:53 +0200</pubDate>
        </item>
        <item>
        	<title>andrewwatts on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11983</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11983</guid>
        	        	<description><![CDATA[<p>Hi Rumen, </p>
<p>Thanks for your response, I have a couple problems with both the suggestions you have suggested, but before I explain the problems.&#160; Let me better explain what I am trying to do, and maybe you&#39;ll have a better suggestion.</p>
<p>I want a form in a modal that has a nested tabled, such that I can label the rows and columns, and allow for input in the cells.&#160; Above and below this layout I also have entries with a label and single cell for input. </p>
<p>Example markup (w/o jqgrid) might look like:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4628' value='Select Code' data-codeid='sfcode4628' /></p>
<div class='sfcode' id='sfcode4628'>&#60;form&#62;<br />&#160;&#160;&#160; &#60;table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;td&#62;label&#60;/td&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;<br />&#160;&#160;&#160; &#60;/table&#62;<br />&#160;&#160;&#160; &#60;table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;caption&#62;a note about the data to be input&#60;/caption&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;th&#62;&#60;/th&#62;&#60;th&#62;column 1&#60;/th&#62;&#60;th&#62;column 2&#60;/th&#62;&#60;/tr&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;th&#62;row1&#60;/th&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;/tr&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;th&#62;row2&#60;/th&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;/tr&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;th&#62;row3&#60;/th&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;&#60;/tr&#62;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; &#60;/table&#62;<br />&#160;&#160;&#160; &#60;table&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;tr&#62;&#60;td&#62;label&#60;/td&#62;&#60;td&#62;&#60;input type="text"&#62;&#60;/td&#62;<br />&#160;&#160;&#160; &#60;/table&#62;<br />&#60;/form&#62;</div>
<p>And it&#39;s also important to note that I do not need to display any of the elements in the 2nd table in the grid, ie: they&#39;re all hidden.&#160; But, I do need to display them for add/edit/view.</p>
<p>I probably could emulate this with rowpos and colpos, however it&#39;s expensive to insert a caption, a row for column labels, change the row labels, and hide the 2nd column row labels, all must be done following the jqgrid rendering.&#160; Plus, I hit css issues in the rows that are above and below the nested because jqgrid inserts empty table cells (instead of using colspan) where there is no label/input element. (i would like the input element width to be the whole width, not only the first 2 columns in the table jqgrid renders).</p>
<p>I don&#39;t think custom_element works because everything returned by the custom_element function is inserted in the same table cell, which presents css issues as well as if i would ask custom_element to render more than one element then I believe that impacts checkOnSubmit and checkOnUpdate.</p>
<p>I think the closest is probably GridToForm/FormToGrid, but as I previously mentioned I&#39;d rather not have to duplicate the functionality that already is provided by default.</p>
<p>I think it would be really nice to have the ability to provide a custom form, then have jqgrid go through the form and populate it where input element names match the colModel names.&#160; Or possibly pass a template to jqgrid and then jqgrid renders and populates the template.</p>
<p>Thanks again for the response, and I&#39;d definitely be interested in hearing how you would solve the problem.</p>
</p>
<p>- Andrew</p>
]]></description>
        	        	<pubDate>Mon, 16 Nov 2009 11:00:28 +0200</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11934</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11934</guid>
        	        	<description><![CDATA[<p>It really depends on what you are trying to achieve. As far as forms go, jqGrid has the ability to provide layout for the controls on the form - please take a look at this help link</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....mmon_rules</a></p>
</p>
<p>and especially the documentation about rowpos/colpos - etc. They can be used to customize the form.</p>
</p>
<p>You can also create custom form edit element - check out this demo</p>
<p><a href="http://trirand.com/jqgrid/jqgrid.html" target="_blank">http://trirand.com/jqgrid/jqgrid.html</a></p>
<p>and new in 3.6 -&#62; Create Custom Input Element example.&#160;</p>
<p>You can also customize some of the captions and error message.</p>
</p>
<p>Anything beyond that may require custom code and from what I see in your approach (handling the client-side events) - this is a perfectly legitimate and good approach, from what I can tell.</p>
</p>
<p>Regards,</p>
<p>Rumen Stankov</p>
<p>jqGrid Team</p>
]]></description>
        	        	<pubDate>Sat, 14 Nov 2009 01:54:55 +0200</pubDate>
        </item>
        <item>
        	<title>andrewwatts on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11931</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11931</guid>
        	        	<description><![CDATA[<p>I did look into that, and it might be what I end up doing however there is already a lot of great functionality provided by default (eg: error handling, top/bottom information headers, closeOnEscape, checkOnSubmit, checkOnUpdate, etc...) and that functionality would need to be duplicated if a custom form was used.</p>
<p>I&#39;d prefer not to duplicate functionality, but after looking through the code, I&#39;m also realizing this might not be an easy request to fulfill.&#160; I could attempt a patch that allows for custom forms and maintains functionality, although, I&#39;m hesitant because I don&#39;t fully understand checkOnSubmit, checkOnUpdate, handling of default values and who knows what I haven&#39;t come across yet.</p>
<p>Although, before I attempt a patch, I&#39;m still hoping I&#39;m overlooking something and someone has encountered this before.</p>
]]></description>
        	        	<pubDate>Fri, 13 Nov 2009 21:53:24 +0200</pubDate>
        </item>
        <item>
        	<title>friflaj on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11916</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11916</guid>
        	        	<description><![CDATA[<p>I want something similar. Can the functionality from the "custom buttons and forms" help here?</p>
]]></description>
        	        	<pubDate>Fri, 13 Nov 2009 10:34:25 +0200</pubDate>
        </item>
        <item>
        	<title>andrewwatts on Customizing Form in Modal Dialog</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11878</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/customizing-form-in-modal-dialog#p11878</guid>
        	        	<description><![CDATA[<p>I apologize if this has been asked before but I could not find an appropriate forum thread or example.</p>
<p>Currently I am using the default add/edit buttons in the navigation grid to open a form using jqModal as provided by default functionality in jqGrid, and this all works great.&#160; But, my grids are starting to get more complex and I&#39;m starting to look at customizing the form that shows up in the jqModal dialog.</p>
<p>Currently I&#39;ve used the beforeShowForm event to prototype something similar to this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1619' value='Select Code' data-codeid='sfcode1619' /></p>
<div class='sfcode' id='sfcode1619'>
<p>beforeShowForm: function(form){<br />&#160;&#160;&#160; // generate some html mapping the input element names to colModel names<br />&#160;&#160;&#160; var html = &#39;&#60;div id="custom_form_content"&#62;a custom form layout&#60;/div&#62;&#39;;<br />&#160;&#160;&#160; <br />&#160;&#160;&#160; // use jQuery replaceWith to remove existing form and add custom form<br />&#160;&#160;&#160; form.replaceWith(html);<br />}</p>
</div>
<p>And this appears to be working, however it is very expensive and I&#39;m afraid jqGrid may be doing some things behind the scenes I am not aware of yet (eg: how does this impact view?).&#160; But before I write a lot of expensive code and get into situations I haven&#39;t thought of yet, I thought I&#39;d see how others have handled customizing forms layouts.</p>
<p>Thanks for any suggestions.</p>
<p>-Andrew</p>
]]></description>
        	        	<pubDate>Thu, 12 Nov 2009 18:51:57 +0200</pubDate>
        </item>
</channel>
</rss>