Refreshing a Multi-Selection List Box - InfoPath Dev
in

InfoPath Dev

Refreshing a Multi-Selection List Box

Last post 05-01-2007 11:47 PM by Clay Fox. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-27-2007 07:09 PM

    • Bobby
    • Not Ranked
    • Joined on 04-28-2007
    • Posts 1

    Refreshing a Multi-Selection List Box

    I have a multi-selection list box which I populate from a data source. Based upon a field value in the returned values, I selectively put values into the node associated with the multi-selection list box. The list box then displays those selected values as 'checked.' I am trying to prevent the user from unchecking those values which are initially selected. I created a node which mirrors the initial selection, then used the 'after change' event of the list box to compare the initial values with the current values, and if the de-selected value is in the initial selection node, put it back in the currently selected node. This all works, except the list box does not put the check back in the list box. Everything else is working as designed - the initially selected, then de-selected, value still shows up on a subsequent view, which is based upon selected list box items. I tried a 'XDocument.View.ForceUpdate(),' but still, the check box does not refresh to show that the value is selected. How can the view be refreshed to show the current values? I have looked at the XML, and the value is put back, but the check box still will not show it as selected.
  • 05-01-2007 11:47 PM In reply to

    Re: Refreshing a Multi-Selection List Box

    Great Question.

    It sounds like the list box is not refreshing. I am not sure if / how this could be refreshed.  Have you tried requerying the datasource that feed the list box? Although this maybe would reset other legitimate user selections. I am just wondering if that would refresh it.

    One thought I had though was can you use a rule to make the check box read-only for that control, although this may not be possible in a list box, I have not worked with this specifically. Ideally there should be some validation you could do to have it not accept being unchecked if it was checked before.  You probably have tried this but just wanted to give you some feedback.

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