﻿<?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?)  » Editing State Changed question...</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 09:28:02 GMT</lastBuildDate><ttl>20</ttl><item><title>Editing State Changed question...</title><link>http://forum.strataframe.net/FindPost2892.aspx</link><description>I have created a DevExpress maintenance form.  If I have controls on the form that are not bound to any data but I want them to disable when I enter an editing mode how would I do that? Because I see not way to modify or add to the event handlers for the buttons on the toolstrip.&lt;br&gt;
&lt;br&gt;
After some looking here is how I answered my own question... just want to make sure this is the "best practices" solution.&lt;br&gt;
&lt;br&gt;
[quote]&lt;br&gt;
Private Sub CustomersBO1_EditingStateChanged(ByVal e As MicroFour.StrataFrame.Business.EditingStateChangedEventArgs) Handles CustomersBO1.EditingStateChanged&lt;br&gt;
        Select Case e.EditingState&lt;br&gt;
            Case MicroFour.StrataFrame.Business.BusinessEditingState.Adding, MicroFour.StrataFrame.Business.BusinessEditingState.Editing&lt;br&gt;
                Me.btnSearch.Enabled = False&lt;br&gt;
                Me.txtSearch.Enabled = False&lt;br&gt;
&lt;br&gt;
            Case MicroFour.StrataFrame.Business.BusinessEditingState.Idle&lt;br&gt;
                Me.btnSearch.Enabled = True&lt;br&gt;
                Me.txtSearch.Enabled = True&lt;br&gt;
&lt;br&gt;
        End Select&lt;br&gt;
    End Sub&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
P.S. any idea why my quote tag didnt work?</description><pubDate>Mon, 18 Sep 2006 15:16:36 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Editing State Changed question...</title><link>http://forum.strataframe.net/FindPost2894.aspx</link><description>[quote]If I have controls on the form that are not bound to any data but I want them to disable when I enter an editing mode how would I do that?[/quote]&lt;/P&gt;&lt;P&gt;This is not tied to the MaintenanceFormToolstrip, it is tied to a business object.&amp;nbsp; The maintenance form toolstrip just works through the integrity of the framework, so an Add just calls the Add() on the form, which in turn calls the Add() on a business object.&lt;/P&gt;&lt;P&gt;All you need to do is capture the EditingStateChanged event of a business object and place your code there.&lt;/P&gt;&lt;P&gt;As for you quote not working, I don't know.&amp;nbsp; I will have to look into it later.&amp;nbsp; Thanks. :)</description><pubDate>Mon, 18 Sep 2006 15:16:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>