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 / September 2005

Tip: Looking for answers? Try searching our database.

Hiding or displaying InfoPath sections with C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rkellow@gmail.com - 23 Sep 2005 23:43 GMT
Hello,

Is there a way to conditionally show (or not show) a section in an
InfoPath form with C# code?

Any help would be appreciated.

Thanks in advance,
Rob
Andrew Watt [MVP - InfoPath] - 24 Sep 2005 11:01 GMT
>Hello,
>
[quoted text clipped - 5 lines]
>Thanks in advance,
>Rob

Rob,

As far as I am aware you can't do that programatically in the current
version.

Andrew Watt
MVP - InfoPath
rkellow@gmail.com - 25 Sep 2005 17:34 GMT
Thanks for the reply Andrew.  It's not exactly what I was hoping to
hear though. I have a dropdown at the top of a form and depending on
what the user selects in it I wanted to show one section or another.

Thanks again,
Rob
Franck Dauché - 25 Sep 2005 23:01 GMT
Hi Rob,

In that case, you don't need C# code.  You can use conditional formatting in
your sections to Show/Hide based on the value stored in the node linked to
your drop down box.

Franck Dauché

> Thanks for the reply Andrew.  It's not exactly what I was hoping to
> hear though. I have a dropdown at the top of a form and depending on
> what the user selects in it I wanted to show one section or another.
>
> Thanks again,
> Rob
Andrew Watt [MVP - InfoPath] - 26 Sep 2005 09:00 GMT
>Thanks for the reply Andrew.  It's not exactly what I was hoping to
>hear though. I have a dropdown at the top of a form and depending on
>what the user selects in it I wanted to show one section or another.
>
>Thanks again,
>Rob

Rob,

To do it in the design interface right click on the section, choose
Properties then select the Display tab, the click on Conditional
Formatting.

Andrew Watt
MVP - InfoPath
vtasparagus@gmail.com - 26 Sep 2005 13:28 GMT
It may be worth mentioning to read up xdExtension.  It is the closest
thing I could find to writing managed code that would hida a section.
http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae6119
1bac084fff

Greg Collins [InfoPath MVP] - 27 Sep 2005 23:00 GMT
Yes, using xdExtension, you can call into your C# code to evaluate a condition and return true or false.

Further down in this thread there's a link to an article I wrote out on InfoPathDev.com which describes the process for Rules, but it works the same for conditional formatting.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

Hello,

Is there a way to conditionally show (or not show) a section in an
InfoPath form with C# code?

Any help would be appreciated.

Thanks in advance,
Rob
 
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.