<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Repeating Table - when to sort</title><link>https://www.infopathdev.com:443/forums/thread/34643.aspx</link><pubDate>Fri, 21 Nov 2008 05:50:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34643</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34643.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34643</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We can sort using the below code,&lt;/p&gt;
&lt;p&gt;ArrayList sortValues = new ArrayList();&lt;/p&gt;
&lt;p&gt;foreach(IXMLDOMNode repeatingNode in repeatingNodes)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;sortValues.Add(repeatingNode.xml);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;sortValues.Sort();&lt;/p&gt;
&lt;p&gt;Using above code it will sort by order and we have to replace old repeating section nodes with new repeating section nodes.&lt;/p&gt;
&lt;p&gt;You can use this when you want to sort those values in OnLoad or OnClick event of button.&lt;/p&gt;</description></item><item><title>Repeating Table - when to sort</title><link>https://www.infopathdev.com:443/forums/thread/34618.aspx</link><pubDate>Thu, 20 Nov 2008 17:14:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34618</guid><dc:creator>Stryker007</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34618.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=34618</wfw:commentRss><description>I&amp;#39;ve got a repeating table that I would like to sort a number of ways, maybe by date, alphabetically by one of the fields, etc.

What is the best way to go about this? 

Can it be done while the form is being filled out? Or should it be done once the form is submitted (some kind of validation)?
Thanks!</description></item></channel></rss>