﻿<?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?)  » Deleting Records on SF Maintenance Form</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 24 Sep 2026 14:24:18 GMT</lastBuildDate><ttl>20</ttl><item><title>Deleting Records on SF Maintenance Form</title><link>http://forum.strataframe.net/FindPost12154.aspx</link><description>Right now when you use the standard SF Maintenance Form, the delete functionality removes the record from the database upon confirmation.&lt;/P&gt;&lt;P&gt;I need the ability to mark the record for deletion, plus change when the delete button is enabled. I have no problem enabling/disabling the button based on the editing state but I can't seem to find a way to mark the record for deletion and use the save to commit the changes. Is there a way to do this without creating a new button and handling the delete&amp;nbsp;separately?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Wed, 24 Oct 2007 22:05:51 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Deleting Records on SF Maintenance Form</title><link>http://forum.strataframe.net/FindPost12176.aspx</link><description>Tim,&lt;/P&gt;&lt;P&gt;At present the MaintenanceFormToolstrip does not have that ability.&amp;nbsp; You could always hide the Delete button and then create your own in this scenario.&amp;nbsp; But this is probably a good one for the enhancement list. :)</description><pubDate>Wed, 24 Oct 2007 22:05:51 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Deleting Records on SF Maintenance Form</title><link>http://forum.strataframe.net/FindPost12159.aspx</link><description>Yes, but you don't have the option to specify this value with the delete button in the standard maintenance form toolstrip. The delete action physically removes the record from the database once you have confirmed the action. I can certainly replace the delete button with my own button and mark the record as deleted but I am looking for something, perhaps in the 'BeforeDelete' event, to set a flag to mark the record for deletion so I can retain the standard SF functionality.&lt;/P&gt;&lt;P&gt;Tim</description><pubDate>Wed, 24 Oct 2007 08:03:15 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: Deleting Records on SF Maintenance Form</title><link>http://forum.strataframe.net/FindPost12158.aspx</link><description>Hello Tim,&lt;P&gt;from the help file:&lt;/P&gt;&lt;DIV class=CodeHeader&gt;&lt;DIV class=CodeHeader&gt;-------------------------------------&lt;/DIV&gt;&lt;DIV class=CodeHeader&gt;DeleteCurrentRow() - Only Mark As &lt;FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff&gt;Deleted&lt;/FONT&gt; Sample [VisualBasic] &lt;/DIV&gt;&lt;DIV class=Code_VisualBasic&gt;&lt;PRE&gt;''' &lt;BR&gt;&lt;SUMMARY&gt;''' This sample shows how to mark the current row as &lt;FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff&gt;deleted&lt;BR&gt;&lt;/FONT&gt;''' in a business object.&lt;BR&gt;''' &lt;BR&gt;&lt;/SUMMARY&gt;''' &lt;BR&gt;&lt;REMARKS&gt;&lt;/REMARKS&gt;Private Sub DeleteCurrentRowSample()&lt;BR&gt;    '-- Mark the current row as &lt;FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff&gt;deleted&lt;/FONT&gt;    &lt;BR&gt;    Customers.DeleteCurrentRow(True)    &lt;BR&gt;    '-- At this point the record has only been marked as &lt;FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff&gt;deleted&lt;/FONT&gt;.&lt;BR&gt;    '   The CurrentRow will be moved to the next record that is not&lt;BR&gt;    '   &lt;FONT style="BACKGROUND-COLOR: #316ac5" color=#ffffff&gt;deleted&lt;/FONT&gt; unless the ShowDeletedRecords property is turned&lt;BR&gt;    '   on within the business object.  Now save the changes to the &lt;BR&gt;    '   server.&lt;BR&gt;    Customers.Save()&lt;BR&gt;End Sub&lt;/PRE&gt;&lt;PRE&gt;The important part is: 'DeleteCurrentRow(true)'&lt;/PRE&gt;&lt;PRE&gt;HTH,&lt;/PRE&gt;&lt;PRE&gt;Ralph&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description><pubDate>Wed, 24 Oct 2007 01:59:55 GMT</pubDate><dc:creator>Ralph Rutschmann</dc:creator></item></channel></rss>