Repeating Table - when to sort - InfoPath Dev
in

InfoPath Dev

Repeating Table - when to sort

Last post 11-20-2008 09:50 PM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-20-2008 09:14 AM

    Repeating Table - when to sort

    I'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!
    Filed under:
  • 11-20-2008 09:50 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Repeating Table - when to sort

    Hello,

    We can sort using the below code,

    ArrayList sortValues = new ArrayList();

    foreach(IXMLDOMNode repeatingNode in repeatingNodes)

    {

    sortValues.Add(repeatingNode.xml);

    }

    sortValues.Sort();

    Using above code it will sort by order and we have to replace old repeating section nodes with new repeating section nodes.

    You can use this when you want to sort those values in OnLoad or OnClick event of button.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.