<?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: Grouping only works after triggering sorting</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting</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/grouping-only-works-after-triggering-sorting/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31400</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31400</guid>
        	        	<description><![CDATA[<p>I resolved the issue - after experimenting a bit:</p>
<p>Instead of 'xmlstring' I now use datatype: function</p>
<p>datatype: function(postdata){<br />
Â Â  Â Â Â  Â Â Â  Â Â Â  Â  var list = jQuery("#list")[0];<br />
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  list.addXmlData(productListData);<br />
}</p>
<p>Works well - even though I still dont know why 'xmlstring' didnt work.</p>
<p>Â </p>
<p>Either way, thanks for your help  <img src="http://www.trirand.com/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="spWPSmiley" style="max-height:1em;margin:0"  /> </p>
]]></description>
        	        	<pubDate>Thu, 20 Nov 2014 15:25:13 +0200</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31385</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31385</guid>
        	        	<description><![CDATA[<p>Ich checked it - and I also checked my Data.</p>
<p>But there is a difference between your code and mine.</p>
<p>The Code you made is uses a xml datatype- I use xmlstring.</p>
<p>I tried your example with the whole chunk of Data I need to retrieve - and found an error on my side (replacements on special Characters) - fixed that and tried your code again - <strong>it worked</strong>.</p>
<p><strong>BUT</strong></p>
<p>I tried the same thing with my code now - changed the datatype to xml - and referenced the same xml file with all the data. <strong>This worked as well</strong></p>
<p>Now I changed the datatype to xmlstring, copy + pasted the xml-file into a hardcoded string, tried to run it again: I got the same exception (Cannot read property 'length' of null)</p>
<p>The reason I use xmlstring was just convienence, I call a Webservice with a specific SOAP Message and get the Products filtered that I need - the specific xml structure that returns can be found here:</p>
<p><a href="http://www.file-upload.net/download-9860105/xmldata.xml.html" target="_blank">xmldata.xml</a></p>
<p>This is the exact structure I give jqGrid, if I use the datatype:xml -<strong> it works</strong></p>
<p>if I copy the exact same Message unedited as string hardcoded into the script and use datatype:xmlstring -<strong> it does not </strong>(but it shows everything when I configure groupind:false - and enable grouping afterwards - but only after triggering something else)</p>
<p>Now my question would be does datatype:xmlstring not support grouping? - I really couldnt find anything that says it doesnt...</p>
]]></description>
        	        	<pubDate>Mon, 17 Nov 2014 15:49:43 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31384</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31384</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Ok. This is exactly your code. <a href="http://www.trirand.com/blog/demo/jqgrid/loading_data/xml/groupdata.html" target="_blank">Check it here</a></p>
<p>It seems to me there is a problem with your data.</p>
<p>Enjoy</p>
<p>Â </p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 17 Nov 2014 12:34:51 +0200</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31382</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31382</guid>
        	        	<description><![CDATA[<p>I dug through the JqGrid Code and found what is crashing - but I am not quite sure what it does:</p>
<p>(taken from jquery.jqgrid.src.js - Row 11.776)</p>
<div class="sfcode">
<pre class="brush-javascript syntax">var leaf = len-1 === n.idx; 
Â Â  Â Â Â  Â Â Â  Â Â Â  Â if( leaf ) {
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â var gg = grp.groups[i+1], kk, ik, offset = 0, sgr = n.startRow,
                  //Line that gives the exception:
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â <span style="text-decoration: underline"><strong> Â end = gg !== undefined ?Â  grp.groups[i+1].startRow : grdata.length; </strong></span>
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â if(grp._locgr) {
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â offset = (page-1)*rn;
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â if(offset &#62; n.startRow) {
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â sgr = offset;
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â }
Â Â  Â Â Â  Â Â Â  Â Â Â  Â Â Â  Â }</pre></div><p>I assume the grdata is the Griddata, so the lenght of the Griddata is undefined - not 0.</p>
<p>It seems to me I either configured something completely wrong - or my process of giving the Grid data is erronous:</p>
<div class="sfcode">
<pre class="brush-javascript syntax">function showProductList()
{Â Â  Â 
Â Â  Â if(reloadProducts)
Â Â  Â {
Â Â Â  //HTML Web Service CalL
Â Â  Â var xmlhttp=false;
Â Â  Â var getCustomersUrl =Â  serviceTrigger; //Web Service URL from which I retrieve the XML
Â Â  Â xmlhttp = new XMLHttpRequest();
Â Â  Â 
Â Â  Â xmlhttp.open("POST", getCustomersUrl, true); //B1if only allows POST requests!
Â Â  Â xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
Â Â   
Â Â  Â var data = '&#60;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"&#62;&#60;soapenv:Header/&#62;&#60;soapenv:Body&#62;&#60;tem:GetProductList&#62;&#60;tem:Group&#62;'+selectedGroup+'&#60;/tem:Group&#62;&#60;/tem:GetProductList&#62;&#60;/soapenv:Body&#62;&#60;/soapenv:Envelope&#62;'
Â Â  Â console.log(data);
Â Â  Â xmlhttp.onreadystatechange=function () {
Â Â  Â Â Â  Â 
Â Â  Â Â Â  Â if(xmlhttp.readyState==4)
Â Â  Â Â Â  Â {
Â Â  Â Â Â  Â Â Â  Â productListData = xmlhttp.responseText;
Â Â  Â Â Â  Â Â Â  Â buildProductGrid(); // ---&#62; Method that builds my grid
Â Â  Â Â Â  Â Â Â  Â reloadProducts = false;
Â Â  Â Â Â  Â }
Â Â  Â Â Â  Â console.log("Loading of Service not done yet");
Â Â  Â Â Â  Â 
Â Â  Â }; //END of READY STATE FUNCTION
Â Â  Â 
Â Â  Â //Sending the Request
Â Â  Â xmlhttp.send(data);
Â Â  Â }else 
Â Â  Â {
Â Â  Â Â Â  Â buildProductGrid(); // ---&#62; Method that builds my grid</pre></div><p>Â </p>
<div class="sfcode">
<pre class="brush-javascript syntax">function buildProductGrid()
{
Â Â  Â jQuery(document).ready(function () {
Â Â  Â 
Â Â  Â Â Â  Â Â Â  Â //Last Selected Row - used for Selection Handling
Â Â  Â Â Â  Â Â Â  Â lastsel = null;
Â Â  Â Â Â  Â Â Â  Â var monthHeaders = getMonthHeader();
Â Â  Â Â Â  Â Â Â  Â //Definition of Grid
Â Â  Â Â Â  Â $("#list").jqGrid({
Â Â  Â Â Â  Â Â Â  Â datatype: 'xmlstring', //Datatype of information represented, will be XML due to HTTP call I guess?
Â Â  Â Â Â  Â Â Â  Â datastr: productListData, // --&#62; this is what is created in the previous function
Â Â Â Â Â Â Â  colNames: ['Hersteller','Artikel Nr', 'PZN', 'Beschreibung', 'Menge', 'NR', 'P', 'K', 'A','VJ','VVJ',monthHeaders[0],monthHeaders[1],monthHeaders[2],monthHeaders[3],monthHeaders[4],monthHeaders[5],monthHeaders[6],monthHeaders[7],monthHeaders[8],monthHeaders[9],monthHeaders[10],monthHeaders[11]],//'Check','Notes'], //Header Layer Definition
Â Â  Â Â Â  Â colModel:[
Â Â  Â Â Â  Â Â Â  Â //GroupColumn
Â Â  Â Â Â  Â Â Â  Â {name:'xxx', index:'xxx',width:1,editable:false,search: false},
Â Â Â Â Â Â Â Â Â Â Â  {name:'itmc',index:'itmc', width:80, align:"left",search:true, key:true},
Â Â Â Â Â Â Â Â Â Â Â  {name:'pzn',index:'pzn', width:65, align:"left",search:true},
Â Â Â Â Â Â Â Â Â Â Â  {name:'itemnm',index:'itemnm', width:200, align:"left",sorttype:"text",search:true},
Â Â  Â Â Â  Â Â Â  Â //EditableParts
Â Â  Â Â Â  Â Â Â  Â {name:'amount', index:'amount', width:40,align:"center",sorttype:"number", editoptions:{size:4, maxlenght:4, height:40},editrules:{number:true},editable:true,search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'nr',index:'nr',width:40,align:"center",sorttype:"number",editoptions:{size:4, maxlenght:4},editrules:{number:true},editable:true,search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'p', index:'p',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true,search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'k', index:'k',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true,search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'a', index:'a',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true,search:false},
Â Â  Â Â Â  Â Â Â  Â //END EditableParts
Â Â Â Â Â Â Â Â Â Â Â  {name:'year12',index:'year12', width:40, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â Â Â Â Â Â Â Â Â Â  {name:'year13',index:'year13', width:40, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon1',index:'mon1', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon2',index:'mon2', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon3',index:'mon3', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon4',index:'mon4', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon5',index:'mon5', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon6',index:'mon6', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon7',index:'mon7', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon8',index:'mon8', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon9',index:'mon9', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon10',index:'mon10', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon11',index:'mon11', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â {name:'mon12',index:'mon12', width:35, formatter:'text', align:"center",sorttype:"number",search:false},
Â Â  Â Â Â  Â Â Â  Â //{name:'check',index:'check', width:40,editRow:true, editable:true, align:"center", edittype:'checkbox',editoptions:{value:"Yes:No"}},
Â Â Â Â Â Â Â Â Â Â Â  //{name:'note',index:'note', width:100,editRow:true, sortable:false, editable:true, editoptions:{maxLenght:'40'}}
Â Â Â Â Â Â Â  ],
Â Â Â Â Â Â Â  //pager: '#pager', //Pager Setup - to go back and forth between entrys #Might solve our display problem!
Â Â Â Â Â Â Â  rowNum: 9999,Â Â  Â Â Â  Â  //Number of Rows to display, the pager switches back and forth
Â Â Â Â Â Â Â  //rowList: [10, 15, 20], //Defines a drop downÂ  Menu to change rowNum (probably not usable in Ipad dev)
Â Â Â Â Â Â Â  sortname: 'xxx',Â Â  Â //Initial sorting column pretty straight forward
Â Â Â Â Â Â Â  sortorder: 'asc',Â Â  Â //Sortorder self explanatory
Â Â Â Â Â Â Â  viewrecords: true, //Number of total records available
Â Â Â Â Â Â Â  gridview: true,Â Â  Â 
Â Â Â Â Â Â Â  autoencode: true,
Â Â Â Â Â Â Â  caption: selectedCustomerName,
Â Â  Â Â Â  Â height: 500,
Â Â  Â Â Â  Â ignoreCase: true,
Â Â  Â Â Â  Â grouping : true,
Â Â  Â Â Â  Â groupingView: {
Â Â  Â Â Â  Â Â Â  Â groupField: ['xxx'],
Â Â  Â Â Â  Â Â Â  Â groupColumnShow: [false],
Â Â  Â Â Â  Â Â Â  Â groupText: ['{0} - {1} Item(s)'],
Â Â  Â Â Â  Â Â Â  Â groupCollapse:false,
Â Â  Â Â Â  Â Â Â  Â //groupDataSorted: true,
Â Â  Â Â Â  Â Â Â  Â //groupOrder: ['asc']
Â Â  Â Â Â  Â },
Â Â  Â Â Â  Â onSelectRow: function(id){
Â Â  Â Â Â  Â Â Â  Â if(id!=lastsel){
Â Â  Â Â Â  Â Â Â  Â Â Â  Â jQuery('#list').jqGrid('saveRow',lastsel);
Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Adding Value for Submission Counter
Â Â  Â Â Â  Â Â Â  Â Â Â  Â makeAmountOutput();
Â Â  Â Â Â  Â Â Â  Â Â Â  Â 
Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Set Null, select new Row
Â Â  Â Â Â  Â Â Â  Â Â Â  Â lastsel = null;
Â Â  Â Â Â  Â Â Â  Â Â Â  Â //jQuery('#list').jqGrid('editRow',id, { keys:true, oneditfunc : function( rowid) {$("#"+rowid+"_NR").focus();}};
Â Â  Â Â Â  Â Â Â  Â Â Â  Â jQuery('#list').jqGrid('editRow',id, {Â Â  keys: true,Â Â  oneditfunc : function( rowid) {Â Â Â Â  $("#"+rowid+"_NR").focus();Â Â  } });
Â Â  Â Â Â  Â Â Â  Â Â Â  Â lastsel=id;
Â Â  Â Â Â  Â Â Â  Â Â Â  Â 
Â Â  Â Â Â  Â Â Â  Â }else
Â Â  Â Â Â  Â Â Â  Â {
Â Â  Â Â Â  Â Â Â  Â Â Â  Â makeAmountOutput();
Â Â  Â Â Â  Â Â Â  Â Â Â  Â jQuery('#list').jqGrid('editRow',id, {Â Â  keys: true,Â Â  oneditfunc : function( rowid) {Â Â Â Â  $("#"+rowid+"_NR").focus();Â Â  } });
Â Â  Â Â Â  Â Â Â  Â }
Â Â  Â Â Â  Â },
Â Â  Â Â Â  Â scrollOffset: 0,
Â Â  Â Â Â  Â editurl: "default.html",
Â Â  Â Â Â  Â hidegrid:false,
Â Â  Â Â Â  Â 
Â Â Â  }); //JqGird Definition END

Â Â  Â //Definition of Filter Search
Â Â  Â $("#list").jqGrid('filterToolbar',{
Â Â  Â Â Â  Â searchOnEnter: false
Â Â  Â Â Â  Â 
Â Â  Â });
Â Â  Â 
Â Â  Â });Â Â  Â 
};</pre></div><p>Â I dont see any mistakes - but I would assume I use Jgrid in a way it is not intended. Would anybody have any idea where my mistake is? - I really dont think it is Jqgrid that bugs out on me</p>
]]></description>
        	        	<pubDate>Mon, 17 Nov 2014 09:54:11 +0200</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31377</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31377</guid>
        	        	<description><![CDATA[<p>I am still lost with this problem...nobody has any idea?</p>
]]></description>
        	        	<pubDate>Thu, 13 Nov 2014 14:31:49 +0200</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31362</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31362</guid>
        	        	<description><![CDATA[<p>Hey Tony,</p>
<p>Â </p>
<p>Thanks a lot unfortunately - I tried using the group: true option, but the grid then doesnt display anything and the console presents me with an exception:</p>
<p><a href="http://i.imgur.com/pjfzHc3.png?1"><img src="http://i.imgur.com/pjfzHc3.png?1" width="100"  class="sfimageleft spUserImage" alt="" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
<p>Thats the reason I started using the loadComplete, and enabling the Grouping afterwards - apparently something isnt loaded or correctly initiated hence the TypeError...or do I missinterpret something horribly?</p>
<p>Â </p>
<p>EDIT: I added the style in the head - works wonders on performance - thank you very much</p>
]]></description>
        	        	<pubDate>Mon, 10 Nov 2014 09:01:46 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31353</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31353</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Using the latest jqGrid version your example works perfectly.</p>
<p>Below are the changes that I have made in order to make this work.</p>
<p>Â </p>
<p>1. In grid options set grouping to true</p>
<p>grouping : true,</p>
<p>2. Disable the loadComplete. Please do not use this with trigger "reloadGrid" - this is selfkilling code.</p>
<p>3. I have added in head section this:</p>
<div class="sfcode">
<pre class="brush-html syntax">&#60;style type="text/css"&#62;
Â  #list .jqgrow { height: 40px !important}
 &#60;/style&#62;</pre></div><p>If you have problems with running this I can put your code online.</p>
<p>Â </p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sun, 09 Nov 2014 13:13:20 +0200</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31340</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31340</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sorry for my very late reply - but the company gave me a more pressing issue, and then I got sick.</p>
<p>Here is one oft he XML-Strings I would use:</p>
<p>Â </p>
<p><strong>&#60;GetProductListResults&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â  &#60;rows&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;page&#62;1&#60;/page&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;total&#62;1&#60;/total&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;records&#62;2&#60;/records&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;row&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Dr. Liebe&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;35931&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell/&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Daylong 50+ extreme Stick 8 ml&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell/&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell/&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;999&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;999&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;1&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;2&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;3&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;4&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;5&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;6&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;7&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;8&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;9&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;10&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;11&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;12&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;/row&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;row&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Dr. Liebe&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;8001&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;1751116&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Excipial Lipocreme 300 g&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell/&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell/&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;Nein&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;999&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;999&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;1&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;2&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;3&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;4&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;5&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;6&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;7&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;8&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;9&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;10&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;11&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;cell&#62;12&#60;/cell&#62;</strong><br />
 <strong>Â Â Â Â Â Â Â Â Â Â Â Â Â Â  &#60;/row&#62; &#60;/rows&#62;</strong></p>
<p><strong>&#60;/GetProductListResults&#62;</strong></p>
<p>Ideally what I would want is the products to be Grouped under the Name Dr. Liebe (which would be the producer of the products) - again it does work - but only after Sorting via the Header or using search - or even triggering an edit.</p>
<p>The Key:true would be the colum ItemCode (itmc) - is it still possible to use Grouping after that?<br />
 I just dont know what I am doing wrong...</p>
]]></description>
        	        	<pubDate>Thu, 06 Nov 2014 11:57:32 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31195</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31195</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>Can you post a simple xml string, so that we investigate what is happen?</p>
<p>Since you use local data it is recommended to have a key:true for one column in colModel.</p>
<p>Â </p>
<p>Kind Regards</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2014 14:20:02 +0300</pubDate>
        </item>
        <item>
        	<title>Nahro on Grouping only works after triggering sorting</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31173</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grouping-only-works-after-triggering-sorting#p31173</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>I stumbled upon another problem, that I cant quite explain/understand.</p>
<p>What I am trying to do:</p>
<p>I load data via xmlstring and want it grouped by one column - but just configuring the grouping via grouping:true and groupingView:{...} just throws a "TypeError: b is null"</p>
<p>So I rummaged through some sources and came to the conclussion - that I should only group after the grid loaded the xmlstring.</p>
<p><strong>loadComplete: function() {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â if(!loadedGrouping)</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //We need to enable Grouping via Xml AFTER loadComplete - or we get a huge null pointer</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â $('#list').jqGrid('setGridParam', { grouping:true });</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //$('#list').jqGrid('setGridParam', { sortorder:'asc' });</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Grouping END</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Reload Grid once so Grouping takes effect</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â $('#list').trigger("reloadGrid");Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â loadedGrouping = true;</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â }</strong></p>
<p>Â </p>
<p>This seems to work - but only after I trigger a sorting change by clicking on a column header - after that the grouping works perfectly.</p>
<p>Here is the rest of my code:</p>
<p><strong>$("#list").jqGrid({</strong><br />
<strong> Â Â Â Â Â Â Â  datatype: 'xmlstring', //Datatype of information represented, will be XML due to HTTP call I guess?</strong><br />
<strong> Â Â  Â Â Â  Â datastr: mydata,</strong><br />
<strong> Â Â Â Â Â Â Â  colNames: ['Producer','Article Nr', 'PZN', 'Description', 'Amount', 'NR', 'P', 'K', 'A','12','13','1','2','3','4','5','6','7','8','9','10','11','12'],</strong><br />
<strong> Â Â  Â Â Â  Â colModel:[</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â //GroupColumn</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'xxx', index:'xxx',width:10,editable:true},</strong><br />
<strong> Â Â Â Â Â Â Â Â Â Â Â  {name:'itmc',index:'itmc', width:85, align:"left"},</strong><br />
<strong> Â Â Â Â Â Â Â Â Â Â Â  {name:'pzn',index:'pzn', width:65, align:"left"},</strong><br />
<strong> Â Â Â Â Â Â Â Â Â Â Â  {name:'itemnm',index:'itemnm', width:220, align:"left",sorttype:"text"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â //EditableParts</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'amount', index:'amount', width:45,align:"center",sorttype:"number", editoptions:{size:5, maxlenght:4, height:40},editrules:{number:true},editable:true},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'nr',index:'nr',width:45,align:"center",sorttype:"number",editoptions:{size:5, maxlenght:4},editrules:{number:true},editable:true},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'p', index:'p',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'k', index:'k',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'a', index:'a',width:30,align:"center",sortable:false, edittype:'checkbox',editoptions:{value:"Ja:Nein"},editable:true},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â //END EditableParts</strong><br />
<strong> Â Â Â Â Â Â Â Â Â Â Â  {name:'year12',index:'year12', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â Â Â Â Â Â Â Â Â Â  {name:'year13',index:'year13', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon1',index:'mon1', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon2',index:'mon2', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon3',index:'mon3', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon4',index:'mon4', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon5',index:'mon5', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon6',index:'mon6', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon7',index:'mon7', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon8',index:'mon8', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon9',index:'mon9', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon10',index:'mon10', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon11',index:'mon11', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {name:'mon12',index:'mon12', width:22, formatter:'text', align:"right",sorttype:"number"},</strong><br />
<strong> Â Â Â Â Â Â Â  ],</strong><br />
<strong> Â Â Â Â Â Â Â  pager: '#pager',</strong><br />
<strong> Â Â Â Â Â Â Â  rowNum: 10,Â Â  Â Â Â </strong><br />
<strong> Â Â Â Â Â Â Â  //rowList: [10, 15, 20],</strong><br />
<strong> Â Â Â Â Â Â Â  sortname: 'xxx',Â Â </strong><br />
<strong> Â Â Â Â Â Â Â  sortorder: 'asc',Â </strong><br />
<strong> Â Â Â Â Â Â Â  viewrecords: true,</strong><br />
<strong> Â Â Â Â Â Â Â  gridview: true,Â Â  Â </strong><br />
<strong> Â Â Â Â Â Â Â  autoencode: true,</strong><br />
<strong> Â Â Â Â Â Â Â  caption: "Producer Name (Placeholder)",</strong><br />
<strong> Â Â  Â Â Â  Â height: 520,</strong><br />
<strong> Â Â  Â Â Â  Â grouping:false,</strong><br />
<strong> Â Â  Â Â Â  Â groupingView: {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â groupField:['xxx'],</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â groupColumnShow: [false],</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â groupText: ['{0} - {1} Item(s)'],</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â groupCollapse:false,</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â //groupDataSorted: true,</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â //groupOrder: ['asc']</strong><br />
<strong> Â Â  Â Â Â  Â },</strong><br />
<strong> Â Â  Â Â Â  Â onSelectRow: function(id){</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â if(id!=lastsel){</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â jQuery('#list').jqGrid('saveRow',lastsel);</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â lastsel = null;</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â jQuery('#list').jqGrid('editRow',id,true);</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â lastsel=id;</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â var focusElement = id+'_NR';</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //alert(focusElement);</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â $(focusElement).focus();</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //$(document).bind("mouseup",function(event) {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Â Â  Â jQuery('#list').jqGrid('getCell',id,'NR').focus(); //selects specific row and underlying cell and sets the focus</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //});</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â }</strong><br />
<strong> Â Â  Â Â Â  Â },</strong><br />
<strong> Â Â  Â Â Â  Â scrollOffset: 0,</strong><br />
<strong> Â Â  Â Â Â  Â editurl: "default.html",</strong><br />
<strong> Â Â  Â Â Â  Â hidegrid:false,</strong><br />
<strong> Â Â  Â Â Â  Â loadComplete: function() { //function that manipulates ALL rows after the loading is done</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â if(!loadedGrouping)</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //We need to enable Grouping via Xml AFTER loadComplete - or we get a huge null pointer</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â $('#list').jqGrid('setGridParam', { grouping:true });</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //$('#list').jqGrid('setGridParam', { sortorder:'asc' });</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Grouping END</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â //Reload Grid once so Grouping takes effect</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â $('#list').trigger("reloadGrid");Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â loadedGrouping = true;</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â }</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â var grid = $("#list");</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â var ids = grid.getDataIDs();</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â for (var i = 0; i &#60; ids.length; i++) {</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â Â Â  Â grid.setRowData ( ids[i], false, {height: 40} ); //change this number to manipulate Row-Height</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â }</strong><br />
<strong> Â Â  Â Â Â  Â Â Â  Â </strong><br />
<strong> Â Â  Â Â Â  Â }</strong><br />
<strong> Â Â Â  }).jqGrid('navGrid','#pager',{add:false,edit:false,del:false});</strong></p>
<p>Â </p>
<p>I admit I am very new to JqGrid and even Jquery and Jscript in generall - so I might missinterpreted the intent behind the events.</p>
]]></description>
        	        	<pubDate>Fri, 03 Oct 2014 10:21:08 +0300</pubDate>
        </item>
</channel>
</rss>