Child Form Save and Undo Buttons disabled


Author
Message
Ed Summers
Ed Summers
StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)StrataFrame Beginner (35 reputation)
Group: StrataFrame Users
Posts: 15, Visits: 434
When I call this form as a child, I hit the EDIT button to get into edit mode. After I change the value of a textbox and tab to the next control, I am expecting the SAVE and UNDO buttons to become enabled. That does not happen. However, when I close the form, it does prompt me to save changes, so it recognizes the changed data. Please let me know why the SAVE and UNDO buttons are not available in this scenario.



(Screenshot attached)



Thanks for your help,

Ed Summers

Remember, You Can Pick Your Friends

You Can Pick Your Nose But

You Can't Pick Your Friend's Nose

Attachments
no edit.gif (123 views, 19.00 KB)
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Is there a different approach I should be taking?

You are never going to be able to totally control the enabled state of the MaintenanceFormToolstrip this way. It is an encapsulated control and follows the logic as mentioned in the previous post.  You have two options. 

Option 1
Hide the Delete button the MaintenanceFormToolstrip by setting the IncludeDeleteButton property to False.  You can then add another button to the end of the toolstrip (or create another toolstrip) that has the delete logic you require.

Option 2
Your second option is to just create your own maintenance form toolstrip.  It is not a difficult task since none of the logic is written in the MaintenanceFormToolstrip anyway.  You will just need to handle the EditStateChanged, Navigated, etc. events and then use the Add(), Edit(), Save(), Undo(), etc methods on the form.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search