﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Goofy Managed ReadOnly State</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 22 Jun 2026 07:12:51 GMT</lastBuildDate><ttl>20</ttl><item><title>Goofy Managed ReadOnly State</title><link>http://forum.strataframe.net/FindPost30524.aspx</link><description>Hi all.&lt;br/&gt;&lt;br/&gt;I have a winform with a primary BO and a&amp;nbsp;TabControl that houses 2 Child BOs (They are logical children but not set up as Child BOs in the property sheet. I am handling the relationships in code). &lt;br/&gt;&lt;br/&gt;Anyway, here is the goofy thing. I want the user to be able to edit the child BOs whenever they click on the edit button in the form's toolbar. The very first time the user clicks the edit button, everything happens as it should except that the child BO on the 2nd page of the TabControl does not get put into edit mode. If the user then click the Undo button in the toolbar and tries to edit after that, everything works - including the controls on the second page.&lt;br/&gt;&lt;br/&gt;Any ideas? I am getting tired of flinging code at this :)&lt;br/&gt;&lt;br/&gt;TIA&lt;br/&gt;&lt;br/&gt;Marcia</description><pubDate>Wed, 02 Nov 2011 13:54:48 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: Goofy Managed ReadOnly State</title><link>http://forum.strataframe.net/FindPost30525.aspx</link><description>Well, here I am talking to myself again :)&lt;br/&gt;&lt;br/&gt;For anyone else who runs into this, I found the answer at &lt;a href="http://stackoverflow.com/questions/2678184/c-sharp-winforms-tabcontrol-elements-reading-as-empty-until-tabpage-selected"&gt;&lt;a href="http://stackoverflow.com/questions/2678184/c-sharp-winforms-tabcontrol-elements-reading-as-empty-until-tabpage-selected"&gt;http://stackoverflow.com/questions/2678184/c-sharp-winforms-tabcontrol-elements-reading-as-empty-until-tabpage-selected&lt;/a&gt;&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;So I just added this code in the form's Shown event handler and the problem went away:&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;foreach&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt; (&lt;/font&gt;&lt;/font&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;TabPage&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt; tp &lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;in&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt; tcProjectDetails.TabPages) &lt;br/&gt;&lt;br/&gt;{ &lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tp.Show();&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcProjectDetails.TabPages[0].Show();&lt;br/&gt;&lt;br/&gt;} &lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Wed, 02 Nov 2011 13:54:48 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item></channel></rss>