<?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: setRowData behavior</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior</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/bugs/setrowdata-behavior/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Reg on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1173</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1173</guid>
        	        	<description><![CDATA[<p>Thank you Tony,</p>
<p>That fixes that problem beautifully. What I was missing was the mention of the grid_id. Is this something that should go into the docs somewhere or is it a jQuery feature that everyone (except beginners like me)&#160;will know about?</p>
<p>Thanks again</p>
<p>Reg</p>
]]></description>
        	        	<pubDate>Sun, 20 Jul 2008 09:03:03 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1171</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1171</guid>
        	        	<description><![CDATA[<p>Maybe I will explain this in detail.</p>
<p>1. When the grid is constructed we have something like:</p>
<p><code> </code></p>
<p>...</p>
<p>&#60;tr id=&#39;123&#39;&#62;&#60;td&#62;myval&#60;/td&#62;..&#60;/tr&#62;</p>
<p>...</p>
<p>After editRow we have</p>
<p>&#60;tr id=&#39;123&#39;&#62;</p>
<p>&#60;td&#62;&#60;input id=&#39;123_myname&#39; ..val=&#39;myval&#39; /&#62;&#60;/td&#62;...</p>
<p>&#60;/tr&#62;</p>
</p>
<p>So when we call after this setRowData the entry input tag is replaced with the value from setRowData.</p>
<p>Now - one possible solution is those from Reg</p>
<p>$("#"+id+"_myname","#mygrid").val("newvaluehere")</p>
<p>Another solution is to write additional method which will act to this case</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 20 Jul 2008 04:37:10 +0300</pubDate>
        </item>
        <item>
        	<title>Reg on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1166</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1166</guid>
        	        	<description><![CDATA[<p>I think I might have a similar situation. I have two columns &#8212; account and amount &#8212; in a grid where the rows represent the parts of an accounting transaction. When I add a row, the user selects an account and my javascript code then calculates what the amount would have to be based on all the other rows (it&#160;tries to force a balance across all rows in this transaction). It then sets the amount cell to this calculated amount.&#160;</p>
<p>But it is possible that the user does not want all of the outstanding amount to go to this account, so he (or she) has to be able to edit the amount before saving the row.</p>
<p>What happens is, the javascript calculates the balance, then uses</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#tblwriteoff&#39;).setRowData(id,{ &#39;amount&#39;:num } );</p>
<p>to set the amount column on this row to the balance and the cell, which previously was editable (before I selected the account), no longer is.</p>
<p>So I tried</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#&#39; + id + &#39;_amount&#39;).val(num);</p>
<p>and this is even worse; now the amount does not hold its value.</p>
<p>After that I tried</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#tblwriteoff&#39;).setCell(id,&#39;amount&#39;,num);</p>
<p>and still no joy. The amount is there but the cell is not editable. WHen I save the row (I am using keys:true so I press enter when the cursor is in the account cell) the amount data disappears.</p>
<p>Am I doing something wrong and one of these should work, or is the cell going to be not editable whatever I do?</p>
<p>And if so, what do you suggest for pre-populating a cell and still leaving it editable?</p>
<p>Thanks,</p>
<p>Reg<br />&#160;</p>
]]></description>
        	        	<pubDate>Sat, 19 Jul 2008 16:50:16 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1133</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1133</guid>
        	        	<description><![CDATA[<p>I did not want to set row to be "not editable" after SetRowData,</p>
<p>there is a saveRow method to do that.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 09:10:47 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1132</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1132</guid>
        	        	<description><![CDATA[<p>But I &#39;m not sure if after this you will have the expected behavior.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 08:07:42 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1131</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1131</guid>
        	        	<description><![CDATA[<p>This is expected behavior and not a bug. Let me try to explain:</p>
<p>The reason when you call this way</p>
<p>setRowData(rowid,{&#8221;id&#8221;:&#8221;newid&#8221;,&#8220;Name&#8221;:&#8221;NewName&#8221;)}</p>
<p>and all is ok is that these fields are not editable. As of the names of the</p>
<p>methods they operate per row and not per cell.</p>
<p>To work this you should set the row to be not editable after</p>
<p>setRowData something like</p>
<p>$("#rowid","#mygrid").attr("editable","0");</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 08:05:50 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1130</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1130</guid>
        	        	<description><![CDATA[<p>Yes, that is. And if i call</p>
<p>setRowData(rowid,{&#8221;id&#8221;:&#8221;newid&#8221;,&#8220;Name&#8221;:&#8221;NewName&#8221;)} that way,</p>
<p>without set value to kind the row is staying editable as it should be.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 07:58:14 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1129</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1129</guid>
        	        	<description><![CDATA[<p>Sorry maybe I do not understand.</p>
<p>So:</p>
<p>1. you call editRow;</p>
<p>(some fields are not editable and only Kind is editable)</p>
<p>2. you call setRowData(rowid,{&#8221;id&#8221;:&#8221;newid&#8221;,&#8220;Name&#8221;:&#8221;NewName&#8221;,</p>
<p>&#8220;Kind&#8221;:&#8221;0"}) right?</p>
<p>In this case the editable column Kind is overwritten with the value and it</p>
<p>is no more editable - right?</p></p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 07:47:08 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1128</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1128</guid>
        	        	<description><![CDATA[<p>The thing that i want to explain is:</p>
<p>when i set new values of columns</p>
<p>with setRowData method and describe in this method all the columns</p>
<p>and theri values the row after that the row colsed himself(all inputs</p>
<p>and select are text which user can`t edit) if it was in&#160;</p>
<p>edit mode(editRow) and I did not call SaveRow to do that.</p>
<p>Describes in my third&#160; post.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 07:35:25 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1127</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1127</guid>
        	        	<description><![CDATA[<p>Do not see setRow instead. (Mybe you call it in EditPerson() function)</p>
<p>What I try to explain is:</p>
<p>If you call editRow on grid and after editRow you call setRow on same grid your data is overwritten by setRow the field has a flag editable,but with data that is overwritten - so you can anymore do edit an this until you not call</p>
<p>restoreRow.</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 06:57:31 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1126</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1126</guid>
        	        	<description><![CDATA[<p>I did not understand why but ...</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9978' value='Select Code' data-codeid='sfcode9978' /></p>
<div class='sfcode' id='sfcode9978'>ondblClickRow:function(rowid){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid").editRow(rowid,false);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid #"+rowid +" input,select").each(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).attr("size","");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).css("width","96%");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this).css("font-size","13px");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if($("#healthExpertGrid #"+rowid).attr("status")!=recInsert)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid #"+rowid).attr("status",recEdit);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; EditPerson();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#container input,select,textarea").focus(function(){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; lastSelection = $(this).attr("id");<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid #"+rowid).keyup(function(e){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var keyCode = e.keyCode &#124;&#124; window.event.keyCode;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(keyCode == 27){<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid").restoreRow(rowid);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $("#healthExpertGrid #"+rowid).attr("status",recBrowse);<br />&#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; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</div></p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 06:18:24 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1125</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1125</guid>
        	        	<description><![CDATA[<p>Could you please publish the full code in ondblClickRow event?</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 06:01:23 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1124</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1124</guid>
        	        	<description><![CDATA[<p>After editRow function.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 05:56:47 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1123</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1123</guid>
        	        	<description><![CDATA[<p>When you call setRow - before or after editRow?</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 05:23:29 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1122</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1122</guid>
        	        	<description><![CDATA[<p>I have jqGrid with 3 columns,</p>
<p>1. id column,hidden</p>
<p>2. Name column text, not editable by user</p>
<p>3. Kind type combobox editable</p>
<p>on dbclick i set editRow for dbclicked row</p>
<p>i`m using setRowData as callback from other action to change the</p>
<p>name Name and id&#160; column:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4687' value='Select Code' data-codeid='sfcode4687' /></p>
<div class='sfcode' id='sfcode4687'>
<p>$("#gridid").setRowData($("#grid").getGridParam("selrow"),</p>
<p>{"id":"newid",</p>
<p>"Name":"NewName",</p>
<p>"Kind":"0"}</p>
<p>)</p>
</div>
<p>after this action current row is closed for editing by the setRowData.</p>
<p>&#160; if i do:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3252' value='Select Code' data-codeid='sfcode3252' /></p>
<div class='sfcode' id='sfcode3252'>
<p>$("#gridid").setRowData($("#grid").getGridParam("selrow"),</p>
<p>{"id":"newid",</p>
<p>"Name":"NewName",}</p>
<p>)</p>
</div>
<p>without set Kind column value</p>
<p>current row is not closed for edit wich is fine for me.</p>
<p>After playing a while with this behavior I noticed that if i set with</p>
<p>setRowData only the editable column (in my case Kind column wich is type"select") the row is closed for edit from himself again.</p></p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 04:39:26 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1121</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1121</guid>
        	        	<description><![CDATA[<p>Could you please post your code here or send me to: tony at trirand.com?</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 03:50:06 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1120</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1120</guid>
        	        	<description><![CDATA[<p>Sorry i mean setRowData instead of saveRowData.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 03:02:37 +0300</pubDate>
        </item>
        <item>
        	<title>tony on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1119</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1119</guid>
        	        	<description><![CDATA[<p>Should I mean that you want to set extraparams?</p>
<p>I suppose you have make typo here since the right syntax for saveRow</p>
<p>is</p>
<p>saveRow(rowid, succesfunc, url, extraparam, aftersavefunc,errorfunc)</p>
<p>Is the syntax for extraparams like this {col1:"hisval",col2:""} ?</p>
<p>or this {col1:"hisval",col2} which is wrong IMHO</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 17 Jul 2008 02:45:51 +0300</pubDate>
        </item>
        <item>
        	<title>julizar on setRowData behavior</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1113</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/setrowdata-behavior#p1113</guid>
        	        	<description><![CDATA[<p>I have a row in edit mode (editGridRow), then i do something like:</p>
<p>saveRowData(rowid,{</p>
<p>"col1":"hisval","col2",""</p>
<p>})</p>
<p>current row hav these two 2columns, and with this method i want to fill</p>
<p>only the first column, the second col must be filled by the user. But after i call the saveRowData this way the row is "closed" for editing after that</p>
<p>if i dont set secund col "col2" as "" (set only col1 value with saveRowData)</p>
<p>method there is no problem.</p>
<p>Greetings!</p>
]]></description>
        	        	<pubDate>Wed, 16 Jul 2008 14:43:50 +0300</pubDate>
        </item>
</channel>
</rss>