Here is a bit of challenge for those who have some hair left on their head.
I made a minor changes to EHW's "Dev Bookmarks 3 Alternative" in an effort to make as much as possible foolproof.
There is always some issues for me when enabling and disabling buttons etc based on tGrid values. I made a start but just couldn't work out operators based on tGrid values.
Here is what I was trying to do (Hopefully, there is no logic floor in my explanation, I wouldn't be surprised if there is tho)
♦ All buttons and edit boxes are disabled via on their properties
♦ When there is no record on application and bookmarks grid;
Only app grid ADD button is enabled. Form EXIT button is always enabled.
(All bookmark Text Boxes remains as not enabled.)
♦ When there is one or more record on application grid but no record on bookmarks grid;
App grid ADD. EDIT and DELETE buttons are enabled.
Bookmarks grid ADD. EDIT, DELETE and SAVE buttons are not enabled.
(All bookmark Text Boxes remains as not enabled.)
♦ When there is one or more record on application and bookmarks grid;
App grid ADD. EDIT and DELETE buttons are enabled.
Bookmarks grid ADD. EDIT, DELETE buttons are enabled but SAVE button remains as not enabled.
(All bookmark Text Boxes remains as not enabled.)
♦ When Bookmarks grid ADD button clicked;
App grid ADD. EDIT and DELETE buttons are not enabled.
Bookmarks grid CANCEL and SAVE buttons are enabled but EDIT and DELETE buttons are not enabled but SAVE button are not enabled.
All bookmark Text Boxes are enabled.
♦ When Bookmarks grid EDIT button clicked;
App grid ADD. EDIT and DELETE buttons are not enabled.
Bookmarks grid CANCEL and SAVE buttons are enabled but ADD and DELETE buttons are not enabled.
All bookmark Text Boxes are enabled.
♦ When Bookmarks grid DELETE button clicked;
App grid ADD. EDIT and DELETE buttons are enabled.
Bookmarks grid ADD and EDIT buttons are enabled but CANCEL and SAVE buttons are not enabled.
All bookmark Text Boxes are not enabled.
• After DELETE Bookmarks grid selects/focuses to the next available record and displays details on bookmark text boxes. If there is no record left on bookmarks grid after delete then;
All bookmarks grid buttons are not enabled except ADD button.
All bookmark Text Boxes are not enabled.
♦ When Bookmarks grid CANCEL button clicked;
App grid ADD. EDIT and DELETE buttons are enabled.
Bookmarks grid ADD, EDIT and DELETE buttons are enabled but CANCEL (for cancel button after click event) and SAVE buttons are not enabled.
All bookmark Text Boxes are CLEARED.
All bookmark Text Boxes are not enabled.
♦ When Bookmarks grid SAVE button clicked;
App grid ADD. EDIT and DELETE buttons are enabled.
Bookmarks grid ADD, EDIT and DELETE buttons are enabled but CANCEL and SAVE (for save button after click event) buttons are not enabled.
All bookmark Text Boxes are not enabled.
• After SAVE Bookmarks grid selects/focuses to the saved record and displays details on bookmark text boxes.
♦ On grid cell click and key up;
Bookmarks grid ADD, EDIT and DELETE buttons are enabled but CANCEL and SAVE buttons are not enabled.
All bookmark Text Boxes are not enabled.
♣ Also it needs foreign key restraints for App Grid DELETE button, in order to prevent deleting app record if it contains bookmark record/s.
Avoiding applying disable/enable to panels containing buttons etc,. Buttons etc in disabled panels still looks as enabled, except mouse over color.
Thinking about it, actually it may need a use of fake edit button too?
Please see the attached sample project.