Ticket Q234558
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

The LinkDetailViewController should not add objects in case of many-to-many association.

How to show new-action in many-many detail tab?

created 15 years ago

Hello
if a user wants to add a new item in a many-many detail tab he needs to click "link" and then new in the appearing dialog. Is there simple way to shot the new-action directly in the detail tab (similar to the new in a one-many detail tab)?
thanks
reinhold

Comments (1)
Anatol (DevExpress) 15 years ago

    Hello Reinhold,
    Sorry for the delay in responding. The item that deactivates the NewObjectViewController.NewObjectAction, is added in the NewObjectViewController.UpdateActionState method. To accomplish your task, override this method to remove the mentioned item, as shown in the following code:

    C#
    public class MyWinNewObjectViewController : WinNewObjectViewController { public MyWinNewObjectViewController() { } protected override void UpdateActionState() { base.UpdateActionState(); NewObjectAction.Active.RemoveItem("IsAggregatedOrOneToMany"); } }

    Please let me know if you need any further help.
    Thanks,
    Anatol

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.