StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Editing State Changed question...Expand / Collapse
Author
Message
Posted 09/18/2006 3:01:36 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 07/09/2008 2:20:16 PM
Posts: 436, Visits: 944
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.

After some looking here is how I answered my own question... just want to make sure this is the "best practices" solution.


Private Sub CustomersBO1_EditingStateChanged(ByVal e As MicroFour.StrataFrame.Business.EditingStateChangedEventArgs) Handles CustomersBO1.EditingStateChanged
Select Case e.EditingState
Case MicroFour.StrataFrame.Business.BusinessEditingState.Adding, MicroFour.StrataFrame.Business.BusinessEditingState.Editing
Me.btnSearch.Enabled = False
Me.txtSearch.Enabled = False

Case MicroFour.StrataFrame.Business.BusinessEditingState.Idle
Me.btnSearch.Enabled = True
Me.txtSearch.Enabled = True

End Select
End Sub


P.S. any idea why my quote tag didnt work?
Post #2892
Posted 09/18/2006 3:16:36 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:49:13 AM
Posts: 4,799, Visits: 4,767
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?

This is not tied to the MaintenanceFormToolstrip, it is tied to a business object.  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.

All you need to do is capture the EditingStateChanged event of a business object and place your code there.

As for you quote not working, I don't know.  I will have to look into it later.  Thanks.

Post #2894
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 10:03am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.