<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Force a Sort on the Grid</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Force a Sort on the Grid]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 19:57:15 +0000</pubDate>
  <lastBuildDate>Fri, 04 Nov 2011 14:30:04 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18979</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Force a Sort on the Grid : Hi,  Seems you have same problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18979&amp;PID=66735&amp;title=force-a-sort-on-the-grid#66735</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 18979<br /><strong>Posted:</strong> 04 November 2011 at 2:30pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Seems you have same problem as: <a href="http://forum.codejock.com/forum_posts.asp?TID=19020&amp;title=new-row-does-not-sort-properly" target="_blank">http://forum.codejock.com/forum_posts.asp?TID=19020&amp;title=new-row-does-not-sort-properly</A></DIV><DIV>&nbsp;</DIV><DIV>If a column is sorted (ASC or DESC) and after call .Populate the grid is sorted again. Can you upload some kind of test project which shows your problem?</DIV><DIV>&nbsp;</DIV><DIV>Sort columns by code: use SortOrder collection. Here's Sample from CJ (see Help)</DIV><DIV>&nbsp;</DIV><DIV><H4 =dxh4>Example</H4><DIV =Specific Name="Example_VB"><p><SPAN =lang>&#091;Sorting columns in the ReportControl (Visual Basic)&#093;</SPAN>&nbsp;This sample illustrates how to sort the columns in the ReportControl. If you had 8 columns added to the ReportControl, this sample would sort the columns first by the column at Itemindex 7, then by the column at ItemIndex 2, then by the column at ItemIndex 5.</p><DIV =Specific Name="Code_VB"><TABLE =CodeC&#111;ntainerTable cellSpacing=0 cellPadding=0><T><TR><TD noWrap><CODE =VB>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'This code below will add three columns to the <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> collection of coluns.</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'This will cause the columns in the ReportControl to first be sorted by column 7,</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'which has an index of zero (0) in the <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> collection. Columns are first sorted</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'in the order that they are added to the <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> collection.</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;wndReportControl.<FONT style=": #316ac5" color=#ffffff>SortOrder</FONT>.Add wndReportControl.Columns(7)<BR>&nbsp;&nbsp;&nbsp;&nbsp;wndReportControl.<FONT style=": #316ac5" color=#ffffff>SortOrder</FONT>.Add wndReportControl.Columns(2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;wndReportControl.<FONT style=": #316ac5" color=#ffffff>SortOrder</FONT>.Add wndReportControl.Columns(5)<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'This will cause the column at index 1 of the <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> collection to be sorted</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'in descending order.</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;wndReportControl.<FONT style=": #316ac5" color=#ffffff>SortOrder</FONT>(1).SortAscending = <FONT =keyword>False</FONT><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'Any time you add or delete columns to the <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> or GroupOrder collections,</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;<FONT =comment>'the Populate method must be called to show the changes in the ReportControl's view.</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;wndReportControl.Populate<BR></CODE></TD></TR></T></TABLE></DIV></DIV><!--DX end --><!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<H4 =dxh4>$$See_Also$$</H4><p id=dxseealso>%%filtereditemlist%%</p>" --><H4 =dxh4>See Also</H4><p id=dxseealso><a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v15.0.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportColumnOrder.html" target="_blank"><U>ReportColumnOrder Collection</U></A> &nbsp;|&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v15.0.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~SortOrder.html" target="_blank"><U>ReportControl <FONT style=": #316ac5" color=#ffffff>SortOrder</FONT> Property</U></A> &nbsp;|&nbsp;<a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v15.0.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~GroupsOrder.html" target="_blank"><U>ReportControl GroupsOrder Property</U></A> </p><!--DX end --><!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="type=linked" NoHeader="True" NoFooter="True" format="<H4 =dxh4>$$Example$$</H4><p id=dxseealso>%%filtereditemlist%%</p>" --><H4 =dxh4>Example</H4><p id=dxseealso><a href="mk:@MSITStore:C:%5CProgram%20Files%5CCodejock%20Software%5CActiveX%5CXtreme%20SuitePro%20ActiveX%20v15.0.1%5CHelp%5CSymbolReference.chm::/XtremeReportC&#111;ntrol~ReportC&#111;ntrol~GroupsOrder.html" target="_blank"><U>GroupsOrder Sample</U></A> </p><!--DX end --><!--DX start ="Variable" name="CopyrightNotice" at="<p>&nbsp;</p><p>&nbsp;</p><hr size=1><p>%%variable%%</p>" --></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 04 Nov 2011 14:30:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18979&amp;PID=66735&amp;title=force-a-sort-on-the-grid#66735</guid>
  </item> 
  <item>
   <title><![CDATA[Force a Sort on the Grid : I add a record to the grid, do...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18979&amp;PID=66397&amp;title=force-a-sort-on-the-grid#66397</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6827">PurposeSoftware</a><br /><strong>Subject:</strong> 18979<br /><strong>Posted:</strong> 23 September 2011 at 7:36am<br /><br />I add a record to the grid, do a Populate but the new item isn't inserted into the correct position.<div><br>If I click the column header twice to sort (1st time to sort the wrong way then the 2nd to sort the right way) it will sort correctly.</div><div><br></div><div>So, how do I force a Sort of the grid.</div><div><br></div><div>Ie. wndReport.Sort</div><div><br></div><div>Colin</div><div>PurposeSoftware</div><div><br></div>]]>
   </description>
   <pubDate>Fri, 23 Sep 2011 07:36:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18979&amp;PID=66397&amp;title=force-a-sort-on-the-grid#66397</guid>
  </item> 
 </channel>
</rss>