﻿<?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?)  » Undeleting a Control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 08:52:45 GMT</lastBuildDate><ttl>20</ttl><item><title>Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17800.aspx</link><description>I did the unthinkable.&amp;nbsp; I deleted a grid from a form.&amp;nbsp; :crazy:&amp;nbsp; The grid has been in use for quite a while and has had many changes over the last several months.&amp;nbsp; My last commitment to source control was several days ago.&amp;nbsp; Since I did not want to lose all of the work since then, and I had caught myself right away, I did the next best thing...CTRL-Z.&amp;nbsp; The grid came back.&amp;nbsp; I wiped the sweat from my brow and breathed a heavy sigh of relief.&lt;/P&gt;&lt;P&gt;Alas!&amp;nbsp;&amp;nbsp;When I run the app (debug mode), the grid comes up "empty".&amp;nbsp; It shows that there are 31 records (count in column 1), but there is no data showing up.&amp;nbsp; I have built, rebuilt, changed the grid, built, rebuilt again.&amp;nbsp; I reset the datasource (removed the BBS, save, reset the BBS, saved again).&amp;nbsp; I am running out of ideas about why this may be happening.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Is there a "trick" to getting an undeleted control working again?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Bill</description><pubDate>Sat, 12 Jul 2008 09:36:31 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17812.aspx</link><description>LOL...we all have our methods!&amp;nbsp; I have Visual Studio setup to remind me when I exit VS...you can setup an Option within Visual Studio to check things in when closing a Solution or project.&amp;nbsp; You can elect not when when it pops up, but at least it does in fact pop up as a reminder:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/03332d97-4e18-45e7-a2c7-8346.png"&gt;&lt;/P&gt;&lt;P&gt;But Paul is also right in that the event handlers do get "smoked."&amp;nbsp; That is probably what was part of your problem...but the problem there too can be getting Humpty Dumpty back together again correctly depending on how large the program is and how many events, etc. were removed.</description><pubDate>Sat, 12 Jul 2008 09:36:31 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17809.aspx</link><description>[quote][b]Keith Chisarik (07/11/2008)[/b][hr]I was bitten bad enough once&amp;nbsp;that I have a small banner over my door that I run into every day before I leave my office, "DID YOU COMMIT TO SOURCESAFE?"&lt;BR&gt;&lt;P&gt;Sad , but true.[/quote]&lt;P&gt;That's 2 funny&amp;nbsp;I have a daily&amp;nbsp;reminder in outlook set&amp;nbsp;to go off at 12 noon and 5 :30 :D The lunch time one has saved me alot of pain, sometimes&amp;nbsp;I go next door to the strip club for lunch (they have a really great buffet) . And for some unknown reason I sometimes make mistakes later that afternoon and it is really nice to have my morning's work safe and secure.</description><pubDate>Fri, 11 Jul 2008 18:48:28 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17808.aspx</link><description>I was bitten bad enough once&amp;nbsp;that I have a small banner over my door that I run into every day before I leave my office, "DID YOU COMMIT TO SOURCESAFE?"&lt;BR&gt;&lt;/P&gt;&lt;P&gt;Sad , but true.</description><pubDate>Fri, 11 Jul 2008 18:03:43 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17807.aspx</link><description>Next time (hopefully, there will not be a next time) I will see how C# handles these handlers.&amp;nbsp; Apparently, the designer drops the definitions, then, like this one:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;this&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.Load += &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; System.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventHandler&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;this&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.ProductionRequirements_Load);&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;Thanks,&lt;BR&gt;Bill</description><pubDate>Fri, 11 Jul 2008 14:23:50 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17806.aspx</link><description>Bill,&lt;/P&gt;&lt;P&gt;One problem you might have&amp;nbsp;is that once the object gets deleted visual studio removes the handles statement and if you Ctrl Z it it does not re-apply the event&amp;nbsp;handlers,&lt;/P&gt;&lt;P&gt;ie private sub&amp;nbsp; somethingclicked(sender as object, e as event arg) handles something.clicked&lt;/P&gt;&lt;P&gt;after deleted becomes somethingclicked(sender as object, e as event arg) &lt;/P&gt;&lt;P&gt;after Ctrl Z the handler is still misssing so your code never executes,&amp;nbsp;same thing if you cut and paste an object.</description><pubDate>Fri, 11 Jul 2008 13:45:59 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17802.aspx</link><description>:pinch: Painful.&lt;/P&gt;&lt;P&gt;I reverted.&amp;nbsp; I printed everything I could, including screen shots.&amp;nbsp; I will work on getting the last three or so days updated on that one form.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Lesson learned:&amp;nbsp; Become a source control addict.&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Fri, 11 Jul 2008 12:33:17 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Undeleting a Control</title><link>http://forum.strataframe.net/FindPost17801.aspx</link><description>[quote]Is there a "trick" to getting an undeleted control working again?[/quote]&lt;/P&gt;&lt;P&gt;Yup...source control! :crazy:&lt;/P&gt;&lt;P&gt;It is really difficult to supply an answer without actually having the designer file and source code in hand...and even then, no guarantees!&lt;/P&gt;&lt;P&gt;I know that you don't need or want to hear this, but you should really be checking in your work a lot more often...for this very reason :pinch:&amp;nbsp; I am a check-in junkie and check-in when I am finished with a particular segment of code.&amp;nbsp; But regardless, we always check-in everything before we shut down for the day.</description><pubDate>Fri, 11 Jul 2008 11:21:00 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>