Drop-down list - sort - InfoPath Dev
in

InfoPath Dev

Drop-down list - sort

Last post 07-14-2010 07:31 AM by DragosPT. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-14-2010 03:39 AM

    Drop-down list - sort

    Hello

    I'm getting the data into a drop-down list from a web service. (Infopath 2003)

    I need that drop-down to be sorted, and so far the only solution that i could find is to modify the DataObject

     Here is the code: http://pastebin.com/Yj947TkB

     

    The problem with this is: when there are hundreds of items in the dropdown, infopath freezes. I'm guessing every time a 

                    IXMLDOMNode spec = specs[i];
                    spec.text = a[i];

    is executed, the form is updated, and doing this hundreds of times is bad.

     

     

    So, is there a way to stop the form during the FOR to auto-update, or is it another way i can access the drop-down and sort it's data?

     

    Have a nice day.

     

  • 07-14-2010 06:26 AM In reply to

    Added

    thisXDocument.View.DisableAutoUpdate();

    at beginning and

    thisXDocument.View.EnableAutoUpdate();

    at the end and it doesn't work, form still freezes

     

  • 07-14-2010 07:31 AM In reply to

    Done.

     Added <xsl:sort select="." data-type="text" order="ascending" case-order="upper-first"/>  in the XSL file so no coding required

    Tho i'm still curious about the coding part, how would be the right way on doing it, so if anyone knows please answer :)

     

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