Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2007

Tip: Looking for answers? Try searching our database.

Infopath 2007 Multi-select list box selected value at runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jane - 17 Apr 2007 18:26 GMT
Hi,

Here's my situation.  I'm trying to create a multi-select list box that is
populated with values at runtime in C#.  When the form loads, some of the
values in the multi-select list box should be selected already (or checked).  
My secondary data source is a web service that returns an xmldocument.  The
list box is bound to the xmldocument.  

I have searched through the internet and cannot find any information on how
to programmatically set each item in the multi-select list box as selected
based on certain condition.  Please advice or direct me to a website that can
resolve this situation.  

Thank you.
Jane
S.Y.M. Wong-A-Ton - 18 Apr 2007 09:00 GMT
This is part of an answer I gave to another similar post: What you would have
to do is loop through the source of the multiple selection list box, create a
field containing the value for each item from your source, and append it
under the group node that represents the list.

This seems to be a popular request, so I've put it on my - by now long list
:) - of articles to write for my website.
---
S.Y.M. Wong-A-Ton

> Hi,
>
[quoted text clipped - 11 lines]
> Thank you.
> Jane
Jane - 20 Apr 2007 16:40 GMT
Hi S.Y.M.,

Thanks for the quick response.  I think I did that.  I created another XML
file that captures the value but when I try to loop through it, it created
double entries.  

Please include a link where I can find your solution.  Thank you so much for
your help!

Jane

> This is part of an answer I gave to another similar post: What you would have
> to do is loop through the source of the multiple selection list box, create a
[quoted text clipped - 21 lines]
> > Thank you.
> > Jane
S.Y.M. Wong-A-Ton - 21 Apr 2007 10:50 GMT
Hi Jane,

No worries; here's the link:
http://enterprise-solutions.swits.net/infopath2007/article.php?t=programmaticall
y-select-all-items-multi-select-list-box&c=infopath2007


I got the double entries too! That's when you use the display name instead
of the value when adding the items to the multi-select list box.

Hope that helps.
---
S.Y.M. Wong-A-Ton

> Hi S.Y.M.,
>
[quoted text clipped - 32 lines]
> > > Thank you.
> > > Jane
sudhir kumar yadav - 30 Apr 2007 12:30 GMT
respected sir/
             i have a problem. i have a list box we want to show display multiple select value in listbox. when we pass id other page then other page display listbox. we want that listbox show multiple select value display.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.