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 / February 2007

Tip: Looking for answers? Try searching our database.

linking drop down box with value in tree control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
esebastian@esolutionsgroup.ca - 15 Feb 2007 21:00 GMT
Hello All,
I am using infopath 2007 and am hosting the infopath form using the
form control in a windows application in visual studio 2005. In my
windows project i have a tree view control, what i would like to do is
after the treeview node is selected i want to match the text on the
selected node to the text in a drop down box that is on my infopath
form, the dropdown box is populated from the same database as the tree
control.

Here is a visual example.

TreeControl                 Drop Down Box on infopath form

1                                1
2                                2
3                                3
4                                4
5                                5

lets say the user selected node with text # 3 on the tree control, i
want the selected item of the dropdown box to change to 3 to reflect
the selection on the treecontrol..

anyone know how to do this?
Erin
[MSFT] AlexWein - 15 Feb 2007 23:03 GMT
In your hosting application, you have access to the DOM of the infopath form.
The dropdown is bound to some value in the DOM; if you change the value of
that DOM node, the selected value in the dropdown will change, too.

> Hello All,
> I am using infopath 2007 and am hosting the infopath form using the
[quoted text clipped - 21 lines]
> anyone know how to do this?
> Erin
esebastian@esolutionsgroup.ca - 16 Feb 2007 14:11 GMT
Hi Alex,
Thanks so much for your reply.
OK so i figured out that i can set the value of the DOM but what i
want to do however i want to be able to only select whatever values
are available in the drop down box itself. So for instance, if i
select 5 from a tree control and the value 5 does not exist in the
drop down box i don't want it to show up in the DropDownbox, in that
case i want to display a message or something along those lines
alerting the user that this value cannot be selected. Can this be
done??
S.Y.M. Wong-A-Ton - 18 Feb 2007 05:38 GMT
If the drop down box is being populated from a source (either main data
source or secondary data source), you can look up the value in the list of
values and return a message if the value cannot be found.

Since you've been posting the answers to all of your unanswered questions in
this newsgroup, I wrote a possible solution to this problem for you (I do not
do this often :) ). See
http://enterprise-solutions.swits.net/infopath2007/article.php?t=display-message
-box-when-item-does-not-exist-in-combo-box&c=infopath2007


While I wrote the solution for a combo box, it should also work for a
drop-down list box.
---
S.Y.M. Wong-A-Ton

> Hi Alex,
> Thanks so much for your reply.
[quoted text clipped - 6 lines]
> alerting the user that this value cannot be selected. Can this be
> done??
esebastian@esolutionsgroup.ca - 21 Feb 2007 18:59 GMT
I have tried to reply to this message a few times without the reply
going through on this end so if you see more than one reply -- so
sorry.

Thanks so much S.Y.M, the above worked famously!!! I do have a
question for you though. My form has a few comboboxes on it and the
combo boxes have many entries in them, up to 50-60 each... I am
wondering if we can put the Entries fields somewhere else, like in a
secondary data source, if we put them all in the main data source ,
the main data source is going to be HUGE... any wisdom to push my way
on this one???
Thanks,
Erin
S.Y.M. Wong-A-Ton - 22 Feb 2007 06:40 GMT
Absolutely! The solution would work equally well if you used secondary data
sources. The whole idea behind this solution is that there must be a list of
items somewhere that can be checked against. If the items are static, that
is, if you entered them manually into the drop-down, then there would be no
such list. So the items have to be stored either in the main data source or a
secondary data source, whichever suits you best.
---
S.Y.M. Wong-A-Ton

> I have tried to reply to this message a few times without the reply
> going through on this end so if you see more than one reply -- so
[quoted text clipped - 9 lines]
> Thanks,
> Erin
esebastian@esolutionsgroup.ca - 22 Feb 2007 14:16 GMT
It Works!!!
Thanks so much!
Erin
S.Y.M. Wong-A-Ton - 23 Feb 2007 13:10 GMT
Glad I could help. :)
---
S.Y.M. Wong-A-Ton

> It Works!!!
> Thanks so much!
> Erin
 
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.