<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/30027.aspx</link><pubDate>Wed, 02 Jul 2008 10:56:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30027</guid><dc:creator>Sober</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30027.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=30027</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks Anuma, i have already solved the problem yesterday and as i see, i did the same thing as you told me to do.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ohh also i want to share something with you, i prepared a form for the company i worked and in that form there are 3 dropdownlists and also much more controls but the interesting thing is&amp;nbsp; i filled the dropdownlist items manually. (nearly 5-12 items each hold) than i preview the dropdowncontrols and whenever i made a choose in dropdowns it didnt choose the items with lower letters (You can select IT but not Sales) but when you change the Sales to SALES it operates as wanted. There is no condition i selected for the controls. It was interesting but i cant understand the problem so all the items are in capital letters in dropdownlists :) but it works :) &amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks again for reply...&lt;br /&gt;Regards.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/30023.aspx</link><pubDate>Wed, 02 Jul 2008 07:58:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30023</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30023.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=30023</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;You can remove the required symbol from text box when that text box is hiding.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;I think you have selected “Cannot be blank” check box in the text box properties. Please uncheck that and add the following data validation for text box.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;“Dropdownfield” is equal to “products” and “customer text field” is blank.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;In this you can submit the form with out showing validation when “customer text field” is hide.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"&gt;For your another question is about disable text box: You can disable the text box using “Read only” option in the conditional formatting.&lt;/span&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/29952.aspx</link><pubDate>Tue, 01 Jul 2008 10:31:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29952</guid><dc:creator>Sober</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29952.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29952</wfw:commentRss><description>&lt;p&gt;Hi there all,&lt;br /&gt;&lt;br /&gt;Here is the problem i have faced with.&lt;br /&gt;&lt;br /&gt;I have a dropdown listbox with two selections. As products and customers.&lt;br /&gt;&lt;br /&gt;And i have a customer text box(which is cannot be blank). When user selects products selection from drop down list box, i can hide customer text field. And if customers is selected you can fill the customer textbox, till now it works but if i click to submit button(with products selected) it says please fill the areas with red asterix. So i tried to make a way out and hope to disable the TEXTBOX CONTROL. as i see even using a secondary date source or by code it is not allowed by infopath. I tried to put this control inside the section control but section control also does not have disable control option. only control i see that can be disabled is dropdown list box and list box.&lt;br /&gt;&lt;br /&gt;So is there a way to DISABLE the textbox control in infopath i mean DISABLE not HIDE. (I use infopath 2007 with C# Language)&lt;br /&gt;&lt;br /&gt;Regards.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/9764.aspx</link><pubDate>Wed, 17 May 2006 04:26:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9764</guid><dc:creator>hapinder</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9764.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9764</wfw:commentRss><description>everybody has been great help.  Thanks a lot :)</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/9763.aspx</link><pubDate>Tue, 16 May 2006 08:52:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9763</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9763.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9763</wfw:commentRss><description>Hi Hapinder,&lt;br /&gt;&lt;br /&gt;Just check out the following link that describes clearly the solution given by Agni.&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=223&amp;amp;SearchTerms=Is,it,possible,to,Hide/Disable,a,control,through,scripting(jscript),in,infopath?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/9762.aspx</link><pubDate>Mon, 15 May 2006 19:57:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9762</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9762.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9762</wfw:commentRss><description>You can also use "xdExtension:method()" in the conditional formatting.&lt;br /&gt;&lt;br /&gt;Where "method()" is a function in the code and in this case it returns true/false.</description></item><item><title>Re: Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/9761.aspx</link><pubDate>Mon, 15 May 2006 18:33:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9761</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9761.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9761</wfw:commentRss><description>Hello hapinder and welcome to the forum!&lt;br /&gt;&lt;br /&gt;Unfortunately you will not be able to use quite the same object model as you did while working in Visual Studio Windows Applications.  An IXMLDOMNode object has absolutely no formatting of display attributes, this is because XML is strictly data.  The seperation of data and design is a key component of why XML is so cool.  Anyway, I'm rambling.&lt;br /&gt;&lt;br /&gt;To disable, change color, or apply other formatting instructions to a control on your view you will have to use conditional formatting.  To do this, double-click the control, click the Display tab, and then click the Conditional Formatting button.  From here you can add rules to change the way your control is viewed.  To be able to disable the node by code you will have to follow this process:&lt;br /&gt;&lt;br /&gt;1. Create a node (preferably in a secondary data source), and name is "field1Enabled".&lt;br /&gt;2. Add conditional formatting on the field1 control that says to disable the control whenever the "field1Enabled" node is set to FALSE.&lt;br /&gt;3. In your code, set the "field1Enabled" node to true or false corresponding with whether or not you want to enable or disable the control.</description></item><item><title>Using C# to disable controls</title><link>https://www.infopathdev.com:443/forums/thread/5604.aspx</link><pubDate>Mon, 15 May 2006 17:29:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5604</guid><dc:creator>hapinder</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5604</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;I am trying to disable the textbox control when the button is clicked.  I use the following code to select the textbox node.&lt;br /&gt;&lt;br /&gt;IXMLDOMNode field1=thisXDocument.DOM.selectSingleNode("//my:field1");&lt;br /&gt;&lt;br /&gt;How can I disable the textbox...field1.disabled=true...that doesnt work.  Only thing I can do is change the text of the textbox?  How can I change the color, or disable the textbox just like you can do it in a visual studio windows application?</description></item></channel></rss>