<?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 : How to set Default sorted Collumn</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : How to set Default sorted Collumn]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 09:10:32 +0000</pubDate>
  <lastBuildDate>Wed, 20 Jan 2016 05:39:48 +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=22770</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[How to set Default sorted Collumn :   michael_veloso wrote:But your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74346&amp;title=how-to-set-default-sorted-collumn#74346</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 22770<br /><strong>Posted:</strong> 20 January 2016 at 5:39am<br /><br /><p><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by michael_veloso" alt="Originally posted by michael_veloso" style="vertical-align: text-bottom;" /> <strong>michael_veloso wrote:</strong><br /><br />But your solutions seams more robust. As it clears any previous settings then sorts the column.</td></tr></table></p><p>CXTPReportColumns::SetSortColumn &nbsp;do the same<br><table width="99%"><tr><td><pre class="BBcode">void CXTPReportColumns::ResetSortOrder()<br>{<br>	m_pSortOrder-&gt;Clear();<br>}<br><br>void CXTPReportColumns::SetSortColumn(CXTPReportColumn* pColumn, BOOL bIncreasing)<br>{<br>	ResetSortOrder();<br>	m_pSortOrder-&gt;Add(pColumn, bIncreasing);<br>}</pre></td></tr></table><br>But in first case you can also use CXTPReportColumnOrder::InsertAt and &nbsp; CXTPReportColumnOrder::RemoveAt &nbsp;to add/remove several columns in sort order. And&nbsp; SetSortColumn() &nbsp;sets just one column.<br></p>]]>
   </description>
   <pubDate>Wed, 20 Jan 2016 05:39:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74346&amp;title=how-to-set-default-sorted-collumn#74346</guid>
  </item> 
  <item>
   <title><![CDATA[How to set Default sorted Collumn : Thank you for the reply, I found...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74343&amp;title=how-to-set-default-sorted-collumn#74343</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8941">michael_veloso</a><br /><strong>Subject:</strong> 22770<br /><strong>Posted:</strong> 19 January 2016 at 9:08pm<br /><br />Thank you for the reply, I found a way in the end.<div><br></div><div><div>//sort by column 2 descending</div><div>CXTPReportColumn* pColumn = m_GridCtrl.GetColumns()-&gt;GetAt(LETTER_TIMEDATE_COL);</div><div>if (pColumn)&nbsp;</div><div><span ="Apple-tab-span" style="line-height: 1.4; white-space: pre;">	</span><span style="line-height: 1.4;">m_GridCtrl.GetColumns()-&gt;SetSortColumn(pColumn, false);</span></div><div><br></div></div><div>But your solutions seams more robust. As it clears any previous settings then sorts the column.</div>]]>
   </description>
   <pubDate>Tue, 19 Jan 2016 21:08:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74343&amp;title=how-to-set-default-sorted-collumn#74343</guid>
  </item> 
  <item>
   <title><![CDATA[How to set Default sorted Collumn :  	CXTPReportColumnOrder* pColumnOrder...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74333&amp;title=how-to-set-default-sorted-collumn#74333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 22770<br /><strong>Posted:</strong> 19 January 2016 at 4:34am<br /><br /><table width="99%"><tr><td><pre class="BBcode">	CXTPReportColumnOrder* pColumnOrder = wndReport.GetColumns()-&gt;GetSortOrder();<br>	pColumnOrder-&gt;Clear();<br><br>	CXTPReportColumn* pSortedColumn = wndReport.GetColumns()-&gt;GetAt(3);<br>	pSortedColumn-&gt;SetSortIncreasing(FALSE);<br><br>	pColumnOrder-&gt;Add(pSortedColumn);</pre></td></tr></table>]]>
   </description>
   <pubDate>Tue, 19 Jan 2016 04:34:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74333&amp;title=how-to-set-default-sorted-collumn#74333</guid>
  </item> 
  <item>
   <title><![CDATA[How to set Default sorted Collumn : Hello, First time hereI have a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74067&amp;title=how-to-set-default-sorted-collumn#74067</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8941">michael_veloso</a><br /><strong>Subject:</strong> 22770<br /><strong>Posted:</strong> 26 October 2015 at 10:39pm<br /><br />Hello, First time here&nbsp;<div><span style="line-height: 13.44px; : rgb251, 251, 253;">I have a question about CXTPReportControl, mfc c++</span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;">I would like to know how to set a default sort collumn.</span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;">1 side has file names and the other has modified dates, so I always want by default for the list to be sorted by the last modified date on the top.</span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;">So after all records have been added, is there a sortbycollumn(col num) ?</span></div><div><br style="line-height: 13.44px; : rgb251, 251, 253;"><span style="line-height: 13.44px; : rgb251, 251, 253;">I cant seam to find any post or examples that show this.</span><br></div><div>Surely<span style="line-height: 13.44px; : rgb251, 251, 253;">&nbsp;there must be something that allows this.</span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div><div>Appreciate<span style="line-height: 13.44px; : rgb251, 251, 253;">&nbsp;your help.</span></div><div><br></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div><div><span style="line-height: 13.44px; : rgb251, 251, 253;"><br></span></div>]]>
   </description>
   <pubDate>Mon, 26 Oct 2015 22:39:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22770&amp;PID=74067&amp;title=how-to-set-default-sorted-collumn#74067</guid>
  </item> 
 </channel>
</rss>