Can I make all the controls of a section disabled/read only at once?

G

G. Tarazi

Hi



I would like to disable all the controls on the section at once using an internal C# function or conditional formatting, is that possible?



Currently I have a hidden field in the section, if the field value is one, I am hiding the section using the conditional formatting, but I would like the section to become read only the value of that field is two.



Is there is a fast way to do that :) ?



Thank you



George
 
G

G. Tarazi

We are doing that actually, but there are a lot of controls in the form, and
there are continues modifications, this is why I want to find if it is
possible on the section.



But anyway, we started writing a NANT script that will add the read-only
conditional formatting to all controls in the form (that support the
property) in the XSL file automatically.

Thank you for the help.


Well, there kind of is. You can set the conditional formatting to test a
secondary data node. Do this for all the controls. Your code then would set
a boolean value on this secondary data node. All controls conditioned on
that node will be affected at the same time.

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



You can use conditional formatting to make the controls read only.
Unfortunately, there's no way to set this on multiple controls at once.

Thanks,
Dave

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
--
"G. Tarazi" <Tarazi (at) LiveTechnologies.ca> wrote in message
Hi



I would like to disable all the controls on the section at once using an
internal C# function or conditional formatting, is that possible?



Currently I have a hidden field in the section, if the field value is one,
I am hiding the section using the conditional formatting, but I would like
the section to become read only the value of that field is two.



Is there is a fast way to do that :) ?



Thank you



George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top