<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/32306.aspx</link><pubDate>Wed, 17 Sep 2008 15:29:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32306</guid><dc:creator>Bhavesh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32306.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=32306</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is&amp;nbsp;a workaround solution for your requirement. You put one text box on the form. add one more node in the datasource but do not include it on the screen. (name it as &lt;font color="#a31515"&gt;my:MakeREADONLY) &lt;/font&gt;this will work as a flag for making the first control read only. Now add conditional formatting on first control that if the flag is true then make it read only/disable.&lt;/p&gt;
&lt;p&gt;Programatically you set the value of the flag field to TRUE as per your requirement.&lt;/p&gt;&lt;font color="#2b91af"&gt;
&lt;p&gt;XPathNavigator&lt;/font&gt; ReadOnlyNav = MainDataSource.CreateNavigator().SelectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;/my:myFields/my:MakeREADONLY&amp;quot;&lt;/font&gt;, NamespaceManager);&lt;/p&gt;
&lt;p&gt;ReadOnlyNav.SetValue(&lt;font color="#a31515"&gt;&amp;quot;1&amp;quot;&lt;/font&gt;);&lt;/p&gt;
&lt;p&gt;Hope it will solve your problem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Bhavesh&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/31423.aspx</link><pubDate>Wed, 13 Aug 2008 11:07:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31423</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31423.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31423</wfw:commentRss><description>&lt;p&gt;then thier is no way to make text box read only programmatically?&lt;/p&gt;</description></item><item><title>Re: programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/31337.aspx</link><pubDate>Mon, 11 Aug 2008 11:57:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31337</guid><dc:creator>NMadhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31337.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31337</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;CanEdit property is&amp;nbsp;a read only property you cannot set it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Set it in design mode.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Madhuri&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/31260.aspx</link><pubDate>Thu, 07 Aug 2008 15:48:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31260</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31260.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31260</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using Infopath 2007 OM.&lt;/p&gt;
&lt;p&gt;I am selecting control using &lt;strong&gt;xpathnavigator &lt;/strong&gt;it gives CanEdit property,using this can i make it read only?&lt;/p&gt;</description></item><item><title>Re: programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/31250.aspx</link><pubDate>Thu, 07 Aug 2008 12:54:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31250</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31250.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31250</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is not possible for Infopath controls.&lt;/p&gt;</description></item><item><title>programmatically making text box control read only</title><link>https://www.infopathdev.com:443/forums/thread/31247.aspx</link><pubDate>Thu, 07 Aug 2008 11:26:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31247</guid><dc:creator>rohit</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31247.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=31247</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How to set text box control read only programmatically using c sharp.&lt;/p&gt;</description></item></channel></rss>