<?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: Edit multiple rows, submit as batch?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch</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/edit-multiple-rows-submit-as-batch/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>nalpolos on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p19628</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p19628</guid>
        	        	<description><![CDATA[<blockquote>
<p>xgote said:</p>
<blockquote></blockquote>
<p>I&#39;ll post the final solution when I get it so others can use it too.</p>
</blockquote>
<hr />
<p>Hi, it would be very kind if you could post your final solution. It would surely help many users.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Thu, 09 Sep 2010 10:05:00 +0300</pubDate>
        </item>
        <item>
        	<title>dannyflores on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p16869</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p16869</guid>
        	        	<description><![CDATA[<p>I have a similar requirement for my use of the jqGrid. So far I&#39;ve been able to achieve what I needed by wrapping my batch-edit code around their cell-edit plugin. At the end of editing a particular grid, the changes can be retrieved using the getChangedCells() method.</p>
<p>My question is, however, are there any built-in jqGrid methods for posting an array of changed cell/row data to the server? I realize I can accomplish this with multiple calls to saveRow, but for large batches of changed data, the amount of overhead caused by repeatedly making round-trips to the server would be just too much.</p>
<p>Anyone know a solution to this problem?</p>
]]></description>
        	        	<pubDate>Mon, 03 May 2010 18:30:29 +0300</pubDate>
        </item>
        <item>
        	<title>sternr on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p15158</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p15158</guid>
        	        	<description><![CDATA[<p>Hey,</p>
<p>Did you make any progress?</p>
</p>
<p>Thanks,</p>
</p>
<p>--sternr</p>
]]></description>
        	        	<pubDate>Thu, 25 Feb 2010 18:45:11 +0200</pubDate>
        </item>
        <item>
        	<title>xgote on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14717</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14717</guid>
        	        	<description><![CDATA[<blockquote>
<p>xgote said:</p>
<p>So I can get the grid to update from a select input but it changes back after a row is selected.  Why is that?</p>
</blockquote>
<hr />
<p>I was calling .jqGrid(&#39;restoreRow&#39;) during a "onSelectRow".&#160; Works!&#160; In any case, using dataEvents in the column model, passing the index of the row and getting the value from the input using jQuery(&#39;#&#39; + [last selected row] + &#39;_&#39; + [name of the cell]).val(), and populating a hash of changed data, it is easy to write the case that I described above.</p>
</p>
<p>I&#39;ll post the final solution when I get it so others can use it too.</p>
]]></description>
        	        	<pubDate>Thu, 11 Feb 2010 05:32:51 +0200</pubDate>
        </item>
        <item>
        	<title>xgote on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14716</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14716</guid>
        	        	<description><![CDATA[<p><input type='button' class='sfcodeselect' name='sfselectit4950' value='Select Code' data-codeid='sfcode4950' /></p>
<div class='sfcode' id='sfcode4950'> var lastsel;              jQuery("#list4").jqGrid({                      datatype:   "local",                      height:     250,                      colNames:   [&#39;Inv No&#39;,&#39;Date&#39;, &#39;Client&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;],                      colModel:   [ {name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"},                                    {name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"},                                    {name:&#39;name&#39;,index:&#39;name&#39;, width:200, editable:true, edittype: "select", editoptions: { value: testvalue(),dataEvents: [ { type: &#39;change&#39;, data: { cell: &#39;name&#39; }, fn: test  } ] }, editrules: { required: true } },                                    {name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"},                                    {name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"},                                    {name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"},                                    {name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false} ],                      onSelectRow: function(id){                                  if(id &#38;&#38; id !== lastsel) {                                      jQuery(&#39;#list4&#39;).jqGrid(&#39;restoreRow&#39;,lastsel);                                      jQuery(&#39;#list4&#39;).jqGrid(&#39;editRow&#39;,id,true);                                      lastsel = id;                                  }                     },                     multiselect: true,                      caption: "Manipulating Array Data"              });                           function test(e) {                 console.log(e.data[&#39;cell&#39;]);                 var inputValue = jQuery(&#39;#&#39; + lastsel + &#39;_&#39; + e.data[&#39;cell&#39;]).val();                  // form input value                 mydata[lastsel-1][&#39;name&#39;]   =   inputValue;                                                   jQuery("#list4").setRowData(lastsel, {name: &#39;changed!&#39;});                 jQuery("#list4").setCell(lastsel, e.data[&#39;cell&#39;], &#39;changed!&#39;);             }                          function testvalue() {                 return "1:one;2:two;3:three;4:four!!!";             }                          var mydata = [ {id:"123",invdate:"2007-10-01",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},                             {id:"2",invdate:"2007-10-02",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},                             {id:"3",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"},                             {id:"4",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},                             {id:"5",invdate:"2007-10-05",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},                             {id:"6",invdate:"2007-09-06",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"},                             {id:"7",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},                             {id:"8",invdate:"2007-10-03",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},                             {id:"9",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"} ];                                          for(var i=0;i&#60;=mydata.length;i++) {                 jQuery("#list4").jqGrid(&#39;addRowData&#39;,i+1,mydata[i]);              }                      }); </div>
</p>
<p>I&#39;m attempting to write something that will submit changed rows in batch.&#160; So far I have a select input that will fire an event after it&#39;s changed, then attempt to update the grid .&#160; The first part of this idea seems to work.&#160; After selecting a "name" from the select element, after clickout out of the row, that cells value is updated in display.. clicking on another row however, reverts the displayed row.</p>
</p>
<p>So I can get the grid to update from a select input but it changes back after a row is selected.  Why is that?</p>
]]></description>
        	        	<pubDate>Thu, 11 Feb 2010 05:24:55 +0200</pubDate>
        </item>
        <item>
        	<title>xgote on Edit multiple rows, submit as batch?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14665</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-multiple-rows-submit-as-batch#p14665</guid>
        	        	<description><![CDATA[<p>Is it possible to do the following:</p>
<ol>
<li>Edit a row</li>
<li>Maintain update the display with the edited version, without saving the record / re-rendering grid</li>
<li>Change the rows class designating it "edited"</li>
<li>Bind a method to a button in a toolbar to update all edited rows in one batch (so you could write interfaces to true transactional backends).</li>
</ol>
<p>I suppose this has been asked about before but I couldn&#39;t find anything from a simple search.&#160; Can this be done without writing a bunch of custom methods that arbitrarily store a subset of changes?</p>
]]></description>
        	        	<pubDate>Wed, 10 Feb 2010 05:09:56 +0200</pubDate>
        </item>
</channel>
</rss>