Ticket Q572336
Visible to All Users
Duplicate

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

Disable New for Reference/Lookup Properties.

Disable the NEW-Button for one LookupView with one Object

created 11 years ago

Hi,
i would to disable the new-Button in a LookupView programmatically. I now that the Property ICreateableItem disable this Button, but this Property is for all of the same Object. I would to disable the new-button only in one of the LookupViews of the same Object. Who can i do that ?

thanks

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hello Rene,
The easiest "no-code" solution for this task is the following:

  1. Create a clone of the required YourObjectType_LookupListView node via the Model Editor;
  2. Set its AllowNew property to False;
  3. Locate the Views | YourObjectType_DetailView | Items | YourLookupProperty node and set its View attribute to the cloned View;
    I hope this solution meets your needs.

    Other Answers

    created 11 years ago

    Hi Dennis,

    thanks for anwser.
    I have found I code solution. If I cast the ListView.ObjectSpace.Owner as Detailview then I can set the Boollist Property AllowNew[" "] = false. This is smarter and comfortable to set it in a Controller wich it use.

      Comments (1)
      Dennis Garavsky (DevExpress) 11 years ago

        I am glad to hear of your progress, Rene. This solution also looks fine.

        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.