Can I set some fields to read only programatically?

E

Ethan Strauss

Hi,
I have an infopath form with a bunch of fields. OnSubmit I am going to be
validating the form in code (using C#.net 2.0 in Visual Studio 2005). All the
validation seems to work, but I would also like to change some of the fields
to read only in the same code. Is that possible? I don't see way...
Thanks,
Ethan

Ethan Strauss Ph.D.
Bioinformatics Scientist
Promega Corporation
2800 Woods Hollow Rd.
Madison, WI 53711
608-274-4330
800-356-9526
(e-mail address removed)
 
R

Ravi G

Hi,

You can set the fields to read only by using conditional formatting
depending on the conditions you want.
 
P

Paresh

Hi,

You can set the fields to read only by using conditional formatting
depending on the conditions you want.

Yes, as Ravi said, you can set the form fields read only through
conditional formatting. Usually there is no need to achieve this
through code. But still if you want to achieve this through code,
take a look at the workaround discussed in the following link:
http://www.infopathdev.com/forums/p/8731/31250.aspx


Thanks,
Paresh
http://www.openzeas.com/blogs/Paresh/default.aspx
 
Top