<?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: Only half of the subgrids expand after sort</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort</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/only-half-of-the-subgrids-expand-after-sort/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>betty on Only half of the subgrids expand after sort</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p26280</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p26280</guid>
        	        	<description><![CDATA[<p>Have you been able to figure this out? I get the same issue, and it happens on the first load and my first loaded list is a sorted result. Exactly the same problem as you described - only the first half of the subgrid expanded, and the rest of the rows can&#39;t be expanded. By checking with firebug, I can see the subgrid html/javascript got messed up.</p>
</p>
<p>Thanks very much if you could provide some info about how to fix this issue.</p></p>
]]></description>
        	        	<pubDate>Tue, 03 Apr 2012 00:53:08 +0300</pubDate>
        </item>
        <item>
        	<title>sharmstr on Only half of the subgrids expand after sort</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p25763</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p25763</guid>
        	        	<description><![CDATA[<p>Were you able to figure this out?&#160; I have the same issue, but happens on first load.&#160; No matter how many records I return, only have (and exactly half) of the subgirds are being built.&#160; After half of them are built the rest of the rows cant be expanded.</p>
</p>
<p>I&#39;m using 4.3.1 with json</p>
</p>
<p>shawn</p>
]]></description>
        	        	<pubDate>Mon, 23 Jan 2012 17:55:32 +0200</pubDate>
        </item>
        <item>
        	<title>cube2 on Only half of the subgrids expand after sort</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p25475</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/only-half-of-the-subgrids-expand-after-sort#p25475</guid>
        	        	<description><![CDATA[<p>I have looked everywhere for an answer to this problem. Hopefully someone here can point me in the right direction.</p>
</p>
<p>I have a grid that expands all subgrid (in my case custom html) when the oage is loaded. This works just fine. The problem is when i sort. The sort works fine, but the subgrids dont all expand. it appears that no matter how large the set only the frist half in the sort get expanded. The remaining rows stay collapsed AND the row toggle to expand is inactive meaning i cant even manually expand them. Seems like an odd behavior as it appears the it "Kinda" works.</p>
</p>
<p>This is my grid code (4.2.0)</p>
<p class="p1">&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9672' value='Select Code' data-codeid='sfcode9672' /></p>
<div class='sfcode' id='sfcode9672'>
<p class=&#34;&#34;p1&#34;&#34;>&#160;buildNotesGrid: function (noteType, sequence) {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; $.getJSON(&#34;/Grids/Note/&#34; + noteType + &#34;/&#34; + sequence, null, function (data) {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; var notesPage = (&#34;#notes_index&#34;),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; dataRows = data.rows,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; notesGrid = $(&#39;#note_grid&#39;),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; dataRowLength = dataRows.length,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; notesGridContainer = $(notesPage).find(&#34;#gbox_note_grid&#34;);</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; if (dataRowLength &#62; 0) {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; $(notesGridContainer).show();</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; notesGrid.jqGrid({</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; datatype: &#39;clientSide&#39;, &#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; loadonce: true,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; sortable: true,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; sortorder: &#39;asc&#39;,</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; colNames: [&#39;NoteId&#39;, &#39;Type&#39;, &#39;Sub Type&#39;, &#39;ID&#39;, &#39;Created Date&#39;, &#39;Created By&#39;, &#39;Modified Date&#39;, &#39;Modified By&#39;, &#39;Visible to Client&#39;],</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; colModel: [</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;Id&#39;, index:&#39;Id&#39;, hidden: true, classes: &#39;note_id&#39;, title: false, sortable: false, key: true },</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;NoteTypeValue&#39;, index: &#39;NoteTypeValue&#39;, classes: &#39;note_type&#39;, title: false, sortable: false },</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;SubType&#39;, index: &#39;SubType&#39;, classes: &#39;note_sub_type&#39;, title: false, sortable: true, sorttype: &#39;text&#39; },</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;Key1&#39;, index: &#39;Key1&#39;, classes: &#39;key_1&#39;, title: false, sortable: false },</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;CreatedDate&#39;, index: &#39;CreatedDate&#39;, sortType: &#39;date&#39;, classes: &#39;created_date&#39;, sortable: true, sorttype: &#39;date&#39;, title: false, formatter: json.formatJsonDate },</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;CreatedByUsername&#39;, index: &#39;CreatedByUsername&#39;, classes: &#39;created_by_username&#39;, title: false, sortable: true, sorttype: &#39;text&#39; },</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;LastUpdatedDate&#39;, index: &#39;LastUpdatedDate&#39;, sortType: &#39;date&#39;, classes: &#39;last_updated_date&#39;, title: false, sortable: true, sorttype: &#39;date&#39;, formatter: json.formatJsonDate },</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;LastUpdatedByUsername&#39;, index: &#39;LastUpdatedByUsername&#39;, classes: &#39;last_updated_username&#39;, title: false, sortable: true, sorttype: &#39;text&#39; },</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;IsVisibleToClient&#39;, index: &#39;IsVisibleToClient&#39;, classes: &#39;visible_to_client&#39;, title: false, sortable: true, sorttype: &#39;int&#39;, formatter: notes.setVisibleCell, hidden: data.isCurrentUserClient }</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ],</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; width: &#34;100%&#34;,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; height: &#34;100%&#34;,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; altRows: true,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; rowNum: 500,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; subGrid: true,</p>
<p class=&#34;&#34;p4&#34;&#34;>&#160; &#160; &#160; &#160; &#160; subGridOptions: {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; expandOnLoad: true,</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; reloadOnExpand: false</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; },</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; subGridRowExpanded: function (pID, id) {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; var subGridContent = $(this).find(&#34;#&#34; + pID),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; row = $(this).find(&#34;#&#34; + id),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; noteId = parseInt(row.find(&#34;td&#34;).first().next().html()),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; noteType = row.find(&#34;td.note_type&#34;).html(),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; firstTd = subGridContent.parents(&#34;tr&#34;).first().find(&#34;td&#34;).first(),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; secondTd = firstTd.next(),</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; expandedColSpan = parseInt(secondTd.attr(&#34;colspan&#34;)) + 1;</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; firstTd.remove();</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; secondTd.attr(&#34;colspan&#34;, expandedColSpan);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; notes.loadNoteView(noteId, row, subGridContent, noteType);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; },</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; loadComplete: function () {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; notes.resizeGrid();</p>
<p class=&#34;&#34;p5&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; // toolTips.initToolTips();</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; },</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; gridComplete: function () {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; var headerToggle = $(&#34;#note_grid_subgrid&#34;),</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; expandToggle = $(&#34;&#60;div id=&#39;expand_all_toggle&#39; class=&#39;expanded&#39;&#62;&#60;/div&#62;&#34;);</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; headerToggle.html(&#34;&#34;);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; headerToggle.append(expandToggle);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; grid.expandAllToggle();</p>
<p class=&#34;&#34;p3&#34;&#34;>&#160; &#160; &#160; &#160; &#160; &#160; $(&#34;tr.jqgrow:odd&#34;).addClass(&#34;ui-priority-secondary&#34;);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; }</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; });</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; for (var i = 0; i &#60; dataRowLength; i++) {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; var dataRowAtIndex = dataRows[i];</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; notesGrid.jqGrid(&#39;addRowData&#39;, dataRowAtIndex.id, dataRowAtIndex);</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; }</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; notesGrid.fluidGrid({ example: notesPage });</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; $(window).resize(function () {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; &#160; notesGrid.fluidGrid({ example: notesPage });</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; });</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; }</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; else {</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; &#160; $(notesGridContainer).hide();</p>
<p class=&#34;&#34;p4&#34;&#34;>&#160; &#160; &#160; &#160; $(notes.newNoteToggleId).click();</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; &#160; }</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; &#160; });</p>
<p class=&#34;&#34;p2&#34;&#34;>&#160;</p>
<p class=&#34;&#34;p1&#34;&#34;>&#160; }</p>
</div>
<p> I have alos noticed and it may be a possibility. It seems the sort it only reloading the subgrids for HALF, so im wondering if there is some kind of count being made that doesnt take into consideration the subgrids since each subgrid is not a child of the triggering row, but a sibling. so if some kind of count was being stored without the subgrid count then in a event triggered somthing after based on the count it would be HALF off.&#160;</p>
</p>
<p>Im just not sure where to look or how to solve this. Maybe one of the plugin authors could chime in?</p>
</p>
<p>Thanks</p>
<p class="p2">&#160;</p>
]]></description>
        	        	<pubDate>Mon, 19 Dec 2011 23:46:22 +0200</pubDate>
        </item>
</channel>
</rss>