General information
Category:
The Mere Mortals Framework
Title:
CmdDelete not disabling on form
On a CBizObjMaintenanceForm, if a view is not requeried when the form instantiates (this is desired behavior in this case) or, I suppose if no records are found after requery, the forms cmdDelete button will always show up Enabled. After lurking around, I found that the code in the buttons Refresh method was sabotaging all of my and the MM frameworks efforts to disable it.
To make it work, I changed it from:
This.Enabled = (ThisForm.lAllowDelete AND NOT This.lReadOnly AND ;
NOT ThisForm.lReadOnly)
To:
This.Enabled = (ThisForm.lAllowDelete AND NOT This.lReadOnly AND ;
NOT ThisForm.lReadOnly AND NOT ThisForm.oBizObj.lNoRecords)
Is this an acceptable workaround or is the button supposed to be enabled when the form instantiates?
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only