Ordering/Sorting repeated sections - InfoPath Dev
in

InfoPath Dev

Ordering/Sorting repeated sections

Last post 11-15-2005 10:12 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-14-2005 05:46 PM

    Ordering/Sorting repeated sections

    Can i order/sort instances of repeating sections when displayed. For example I want to display repeated sections based on date (ascending). - I dont want to filter the data.

    -- Jay Whittaker --
  • 11-14-2005 06:09 PM In reply to

    Re: Ordering/Sorting repeated sections

    Hi Jay,

    Do you want to do this when the form is loaded or on the fly (people re-ordering your rows based on a column header clicked)?

    Regards,

    Franck Dauché
  • 11-15-2005 09:11 PM In reply to

    Re: Ordering/Sorting repeated sections

    I want to do this each time the form is opened. So if something new is added it is placed in the correct position the next time the form is opened.

    -- Jay Whittaker --
  • 11-15-2005 10:00 PM In reply to

    Re: Ordering/Sorting repeated sections

    Hi Jay,

    So mabe you could write Managed Code called from the Form OnLoad. You could read data from a repeating group, store them into an array, sort in C# and write back the sorted items to the same group.

    Regards,

    Franck Dauché
  • 11-15-2005 10:12 PM In reply to

    Re: Ordering/Sorting repeated sections

    Hi Jay,
    This is easy. There is an example in the out-of-box solution for Asset Tracking. The views are sorted using JScript. You can look at the code by exporting the files for the solution and opening the script.js file. The solution is one of the default samples installed with InfoPath. Sorting in C# is similar. Good luck!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.