<?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: Form editing: difference between add and edit.</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit</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/discussion/form-editing-difference-between-add-and-edit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Form editing: difference between add and edit.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24178</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24178</guid>
        	        	<description><![CDATA[<p>Hello r.cappa and JerryOfPerth,</p>
<p>Thank for the posting.&#160;I agree that the requirement to have some fields visible and editable in Add, but not in Edit dialog is a common requirement. jqGrid has some events like afterShowForm, beforeShowForm, beforeSubmit, serializeEditData which can be used to do almost any changes in the form dialog, the editurl or in the data which will be send. Nevertheless some standard actions could be made more easy to use.</p>
<p>If Tony would read the topic it would write my opinion on the subject.</p>
<p>I think it would be very nice to allow the <strong>editable</strong> property be not only boolean with the data true and false, but to be a string with values like "add", "edit", "add, delete", "add, edit, delete" or something like that. One can instead of that introduce additional property inside of the <a href="/jqgridwiki/doku.php?id=wiki:common_rules#editoptions" target="_blank">editoptions</a> which described <em>which edit operation are permitted on the column</em>.</p>
<p>One another close requirement which I see sometime is the requirement to send some grid fields to the server together with the editable fields. Curently there are exist a tricky possibility to define hidden column like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3627' value='Select Code' data-codeid='sfcode3627' /></p>
<div class='sfcode' id='sfcode3627'>hidden: true, editable: true, editrules: { edithidden: false }, hidedlg: true</div>
<p>to send the data from the column to the server. It&#39;s difficult to read and understand. Moreover sometime one needs <strong>to send the value of some <em>visible</em>, but not editable column</strong> from the grid as the part of the Add/Edit operartion. Not only rowid can be important to for edit operation.</p>
<p>The new property/properties of&#160;<strong>editoption</strong>&#160;with some clear name like <em>sendOnEdit</em>, <em>sendOnAdd</em>, <em>sendOnDel</em>&#160;could be introduced,&#160;which can be used to declare that the field (either hidden or non-hidden non-editable columns) should be send during the corresponding edit operation.</p>
<p>The last suggestion is to define how editurl should be appended. If one uses RESTfull services on the server side the appending of rowid to <strong>editurl</strong> in Edit or Delete operartion should be implemented. Currently one can use <strong>onclickSubmit</strong> or <strong>beforeSubmit</strong> in form editing to modify imediately befor the Ajax requests. In case of inline editing one could construct the url which one needs and use if as the parameter of <strong>editRow</strong> or <strong>saveRow</strong>. In case the usage inline editing indirect as the <a href="/jqgridwiki/doku.php?id=wiki:predefined_formatter#predefined_format_types" target="_blank">formatter:&#39;actions&#39;</a>&#160;the modifying of url could be a little more sofisticated.</p>
<p>A simple in use and in the implementation could be new <strong>editUrlTemplate</strong> option with the value in the form like <em>"/{id}/{col1Name}"</em> which could define the string which will be appended to the <strong>editurl</strong>. The values like <em>{id}</em> and <em>{id}/{col1Name}</em>&#160;where <em>col1Name</em> is the <strong>name</strong> property of some column from <strong>colModel</strong> could be replaced to the corresponding value from the row field. The parameter could be very easy to understand and for the implementation one should just parse the template for the {} and use <strong>encodeURIComponent</strong> JavaScript function to encode the value from the corresponding column.</p>
<p>I think that such changes in the jqGrid would be very usefull and there are easy to implement.</p>
<p>Best regards<br />Oleg&#160;</p></p>
]]></description>
        	        	<pubDate>Sat, 06 Aug 2011 19:54:34 +0300</pubDate>
        </item>
        <item>
        	<title>r.cappa on Form editing: difference between add and edit.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24177</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24177</guid>
        	        	<description><![CDATA[<blockquote>
<p>JerryOfPerth said:</p>
<blockquote>
<p>r.cappa said:</p>
<p>Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?</p>
</p>
<p>Thanks</p>
</blockquote>
<hr />
<p>If you haven&#39;t already found a solution this might help:</p>
<p><a class="question-hyperlink" href="http://stackoverflow.com/questions/3405029/jqgrid-disable-form-fields-when-editing" target="_blank">jqGrid: Disable form fields when editing</a></p>
</blockquote>
<hr />
<p>I&#39;ve already found this, but it is a workaround. It is not a good way, and not so much intuitive, manually hide unused fields in beforeshow event. It can be useful to configure this in a declarative mode.</p></p>
]]></description>
        	        	<pubDate>Sat, 06 Aug 2011 19:04:50 +0300</pubDate>
        </item>
        <item>
        	<title>JerryOfPerth on Form editing: difference between add and edit.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24176</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p24176</guid>
        	        	<description><![CDATA[<blockquote>
<p>r.cappa said:</p>
<p>Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?</p>
</p>
<p>Thanks</p>
</blockquote>
<hr />
<p>If you haven&#39;t already found a solution this might help:</p>
<p><a class="question-hyperlink" href="http://stackoverflow.com/questions/3405029/jqgrid-disable-form-fields-when-editing" target="_blank">jqGrid: Disable form fields when editing</a></p>
]]></description>
        	        	<pubDate>Sat, 06 Aug 2011 18:45:12 +0300</pubDate>
        </item>
        <item>
        	<title>r.cappa on Form editing: difference between add and edit.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p23720</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/form-editing-difference-between-add-and-edit#p23720</guid>
        	        	<description><![CDATA[<p>Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?</p>
</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Tue, 21 Jun 2011 23:37:02 +0300</pubDate>
        </item>
</channel>
</rss>