Overriding the delete button....


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
My question deals with the DevExpress version of the Maintenance form but could you answer it regarding both versions of the maintenance form?



I want to use the default delete button on the MaintenanceFormToolbar but I need an inputbox to popup and ask for a reason for deletion. What would be the best way to approach this? Is there a way to override the delete button... or do I put my inputbox in the beforedelete event in the business object and then just disable the default delete confirmation popup?



Thanks
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
Regardless of you front end, you will want to capture the BeforeDelete event and place your InputBox and logic here.  This way it does not matter where the delete comes from.  You want to be careful to hard-code logic with the UI too much.  For exa,ple, even the MaintenanceFormToolstrip does not have code that executes the delete or add.  Ultimately all of this logic resides on the BO and the MaintenanceFormToolstrip just relies on events to handle itself.  Make sense?
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Yes. Thanks!
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