XAF How to disable properties based on business rules

Source: Internet
Author: User

Developer Express Code Central example://what to:disable property Editors Based on a business rule////This Example D Emonstrates How to hide and disable property editors via the//Conditional appearance module (the obsolete Conditional Edi Tor state module is//used in versions prior to 11.2). The complete description are available in the//what To:disable property Editors Based on a business rule//(ms-help://deve Xpress. xaf/customdocument3221.htm) Help topic.////can find the sample updates and versions for different programming languages here://http://www.devexpress.com/example=E1672using system;using system.componentmodel;using devexpress.xpo;using Devexpress.data.filtering;using devexpress.expressapp;using devexpress.persistent.base;using Devexpress.persistent.baseimpl;using devexpress.persistent.validation;using Devexpress.expressapp.conditionalappearance;using Devexpress.expressapp.editors;namespace editorstateexample.module {[Defaultclassoptions] [ImageName ("Bo_person ")] public class Contact:baseobject {public Contact (session session): base (session) {} publ            IC string Name {get {return getpropertyvalue<string> ("name");}        set {setpropertyvalue<string> ("Name", value);} } [Immediatepostdata] public bool Ismarried {get {return getpropertyvalue<bool> ("Ismarrie D ");        } set {setpropertyvalue<bool> ("ismarried", value);} } [Appearance ("single", Visibility = viewitemvisibility.hide, Criteria = "! Ismarried ", context=" DetailView ")] public string Spousename {get {return getpropertyvalue<string&gt ;("Spousename");        } set {setpropertyvalue<string> ("Spousename", value);} } [Immediatepostdata] public string Address1 {get {return getpropertyvalue<string> ("Addre SS1 ");        } set {setpropertyvalue<string> ("Address1", value);}      }  [Appearance ("Addressoneisempty", Enabled = false, Criteria = "IsNullOrEmpty (ADDRESS1)")] public string Address2 {            get {return getpropertyvalue<string> ("Address2");}        set {setpropertyvalue<string> ("Address2", value);} }    }}
reproduced in: http://www.cnblogs.com/Tonyyang/

XAF How to disable properties based on business rules

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.