Multiple selections within a list box - InfoPath Dev
in

InfoPath Dev

Multiple selections within a list box

Last post 06-10-2006 01:29 AM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-08-2006 08:05 PM

    • ccarter
    • Not Ranked
    • Joined on 05-18-2006
    • New Zealand
    • Posts 14

    Multiple selections within a list box

    Is it possible to make multiple selections within a lists box. the scenario i have is that i have a data source within sharepoint structured as below.

    Col 1 Col 2 Col 3
    A 1 u
    A 2 v
    B 2 w
    C 3 x
    D 4 y
    D 5 z

    I have created the relevant filters so that a cascading list has been setup. If you select A in List (1) you then see in list (2) 1 + 2 then if you select 1 you see u in list (3). Easy !!!
    But, i would like to be able to select multiple lines, ie A + C in list (1) so that list (2) returns 1 + 3 and so on. Is this possible. I looked at the possibility of using selection boxes but opened myself up to a whole world of pain. Any help gartefully received. Christian.
  • 06-09-2006 12:14 AM In reply to

    Re: Multiple selections within a list box

    Hi

    No InfoPath 2003 does not provide built-in support for Multi-select list
    boxes, you would need setup it manually with a scrolling region, take a look
    at the blog post by the InfoPath team for a sample
    http://blogs.msdn.com/infopath/archive/2004/04/01/106039.aspx

    To have this list to be a cascading list of a previous dropdown selection

    Here's is the code, try this:

    Dim strategyNodes As IXMLDOMNodeList =
    thisXDocument.DataObjects("LocalCommWKSLookups").DOM.selectNodes("//Strategies")
    Dim numStrategies As Integer = strategyNodes.length
    If numStrategies > 0 Then
    For countStrategies As Integer = 0 To numStrategies - 1
    If countStrategies <> 0 Then
    thisXDocument.View.ExecuteAction("xCollection::insert", "Strategy_773")
    Dim strategyNode As IXMLDOMNode =
    strategyNodes.Item(countStrategies)
    Dim NewStrategyNameNode As IXMLDOMNode = _

    thisXDocument.DOM.selectNodes("my:myFields/my:Strategies/my:Strategy/my:StrategyName").Item(countStrategies)
    NewStrategyNameNode.text =
    strategyNode.selectSingleNode("StrategyName").text
    Dim NewStrategyIDNode As IXMLDOMNode = _

    thisXDocument.DOM.selectNodes("my:myFields/my:Strategies/my:Strategy/my:StrategyID").Item(countStrategies)
    NewStrategyIDNode.text =
    strategyNode.selectSingleNode("StrategyID").text
    Next
    End If
    Madhuri
    http://www.ggktech.com
  • 06-10-2006 01:29 AM In reply to

    Re: Multiple selections within a list box

    Hi CCarter,
    We also sell a Smart Combo Box for a mere $9.95 that supports multi selection.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.