<?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 : Setting the SortPriority</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Setting the SortPriority]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 00:36:20 +0000</pubDate>
  <lastBuildDate>Sun, 19 Nov 2006 14:59:21 +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=5534</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[Setting the SortPriority : In order to have all newly added...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17450&amp;title=setting-the-sortpriority#17450</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1971">Fossil</a><br /><strong>Subject:</strong> 5534<br /><strong>Posted:</strong> 19 November 2006 at 2:59pm<br /><br />In order to have all newly added rows to be gaurenteed on top of thereport control I have created a workaround.&nbsp; First of all I addeda new column called NEWRECORD and turned its visibility to False.&nbsp;Then turned AutoColumnSorting to false on the control and added thefollowing code to my form.<br><br>Private bDrag as Boolean<br><br>Private Sub OOS_ReportControl_ColumnOrderChanged()<br><br>&nbsp;&nbsp;&nbsp; bDrag = True<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br><br>Private Sub ReportControl_MouseUp(Button As Integer, Shift As Integer, x As Long, y As Long)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim Column As ReportColumn<br><br>&nbsp;&nbsp;&nbsp; If Not bDrag Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case Me.ReportControl.HitTest(x, y).ht<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestHeader<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set Column = Me.ReportControl.HitTest(x, y).Column<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not Column Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If Column.Sortable Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Column.SortAscending = Not Column.SortAscending<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Me.ReportControl.SortOrder.DeleteAll<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Me.ReportControl.SortOrder.AddMe.ReportControl.Columns.Find(COLUMN_NEWRECORD)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Me.ReportControl.SortOrder.Add Column<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Me.ReportControl.Populate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpHitTestGroupBox<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set Column = Me.ReportControl.HitTest(x, y).Column<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not Column Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Column.SortAscending = Not Column.SortAscending<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Me.ReportControl.Populate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; bDrag = False<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set Column = Nothing<br><br>End Sub<br>]]>
   </description>
   <pubDate>Sun, 19 Nov 2006 14:59:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17450&amp;title=setting-the-sortpriority#17450</guid>
  </item> 
  <item>
   <title><![CDATA[Setting the SortPriority : Why not use 2 groups - one for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17374&amp;title=setting-the-sortpriority#17374</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1630">LeeHayton</a><br /><strong>Subject:</strong> 5534<br /><strong>Posted:</strong> 16 November 2006 at 10:59am<br /><br />Why not use 2 groups - one for the new records and on for the existing - and have the new group first.<DIV>Then you can sort within the groups any way you like.</DIV>]]>
   </description>
   <pubDate>Thu, 16 Nov 2006 10:59:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17374&amp;title=setting-the-sortpriority#17374</guid>
  </item> 
  <item>
   <title><![CDATA[Setting the SortPriority : We are encountering an issue where...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17355&amp;title=setting-the-sortpriority#17355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1932">LittleJK</a><br /><strong>Subject:</strong> 5534<br /><strong>Posted:</strong> 15 November 2006 at 6:53pm<br /><br />We are encountering an issue where we are trying set the sortPriority for all our existing records to be all the same say 1 while any new record will have the sortPriority to 0. The desired result would be that the new record(s) will&nbsp; always on top, which when changing the sort by columns the new record(s) will be on top while anything below will be re-sorted based on the column that is sorted.<br><br>thanks&nbsp;]]>
   </description>
   <pubDate>Wed, 15 Nov 2006 18:53:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5534&amp;PID=17355&amp;title=setting-the-sortpriority#17355</guid>
  </item> 
 </channel>
</rss>