Bug Report S133647
Visible to All Users

SystemModules.Link - The AllowNew and AllowDelete attributes for the nested ListView should not impact the Link and Unlink actions

created 15 years ago

If you set AllowNew to false, both the link and new buttons are missing
If you set AllowDelete to false, both the delete and unlink buttons are missing.
There are scenarios where it would not be desirable to allow add new or add delete but to still have link and unlink (as those are very independent types of activities).
Proposed Solution:
Allow for independent control of the link and unlink buttons.

Show previous comments (3)
MK MK
Mark Krasnohorsky 15 years ago

    PS: I solved the problem by creating an interface with 4 methods (AllowAdd, AllowDelete, AllowLink, AllowUnlink)
    Each method has two parameters: View ID, View Object Type and returns bool.
    A controller for non-root listviews checks the CollectionSource.MasterObject for this interface and if present it sets the corresponding actions' active property to the result of the appropriate method call.
    I like this solution because it allows me to control the logic at the business class level; where I feel it belongs.
    Mark

    Dennis Garavsky (DevExpress) 15 years ago

      Hello Mark,
      Thanks for the updates and sharing your findings. Your scenario makes sense, and we would implement this suggestion. A question concerning a workaround you implemented - could you please provide your sample code here so that other users could benefit from it? Thanks for your help.
      Thanks,
      Dennis

        I feel, when dealing with the security system, that the ability to write to the master object matters more in this scenario than if AllowNew/AllowDelete is permitted. You're not creating or deleting anything really when linking/unlinking, especially in a one to many… I consider it writing to the master.

        Anyways, this one is currently biting me.

        Answers approved by DevExpress Support

        created 10 years ago (modified 9 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Additional information:

        The IModelListView.AllowLink and IModelListView.AllowUnlink properties specify whether the associated objects can be linked and unlinked in the current Nested List View.

          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.