Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable New button in Child Form
Message
From
28/10/2002 18:38:53
 
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00716176
Message ID:
00716258
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
>All is working well, except when I leave the GrandChild form up and Navigate in the Parent Form with the toolbar: when I Navigate the Parent record and its Child is Empty, everything is grayed out correctly on the Grand Child Form (as it should be as it now has no parent) - except the New button which I have placed on this GrandChild form is still pushable. How do I gray out this New button if the GrandChild's parent is an empty.

Native framework behaviour would allow you to create a new record when a cursor is empty. So, this behaviour is understandable. What is out of whack is that you have a new button on a grandchild form that has an immediate parent dataset that is also empty. How do you create a "child" record? Do you have a new button at the child form level too? Do you have a value specified in the button's cWorkarea property, if so, what is it? Obviously, you can subclass IsEnabled and test for the workarea equaling the grandchild and test for IsEmpty on the child cursor. However, you need to look at your RI (referential integrity) here. Normally, standard framework behaviour would not allow the creation of a child record when there is no parent. So, the button's cWorkarea value looks suspect and/or the RI in the CDE between the parent, child and grandchild cursors - check how you have specified the relationship(s) between them.

>And one question about the CDE. When I run the CDE Builder on the local view, and select the Open Options tab, I notice the Exclusive check mark is selected. I assume this is normal, but can someone tell me why this is normal?

The "exclusive" check relates to the cursor's lExclusive property. This applies to "tables" only to tell Codemine to open the table exclusively. It does not apply to a local view. Maybe you changed the data source from a table to a view? Anyhow, you can clear this value down in the builder (or set it False in the cursor's property sheet).

HTH
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform