How to: Specify a Display Member (for a Lookup Editor, Detail Form Caption, etc.)如何:指定显示成员(用于查找编辑器、详细信息表单标题等)
Each business object used in an XAF application should have a default property. The default property value is treated as a human-readable identifier in an XAF application UI (e.g., FullName of a Contact, Subject of a Task, etc.). Default property values are displayed in the following:
XAF 应用程序中使用的每个业务对象都应具有一个默认属性。在 XAF 应用程序 UI 中,默认属性值被视为人类可读的标识符(例如,联系人的全名、任务主题等)。默认属性值显示在以下内容中:
- Detail View captions;
- the leftmost columns of List Views;
- Lookup List Views;
- Lookup Editors in an unexpanded state.
- 详细信息视图标题;
- 列表视图的最左侧列;
- 查找列表视图;
- 查找处于未展开状态的编辑器。
Default Property of a Business Class
商务舱的默认属性
It is strongly recommended that you apply the XafDefaultPropertyAttribute attribute and pass the default property name to this attribute. The default property must be declared as public and visible (not hidden using the Browsable(false)attribute). If you do not declare a default property, a GUID or Integer identifier may be displayed in the UI. These identifiers are not intended to be seen by end users and may lead to confusion.
强烈建议您应用 XafDefaultProperty 属性属性并将默认属性名称传递给此属性。默认属性必须声明为公共和可见(不使用可浏览(false)属性隐藏)。如果不声明默认属性,则 UI 中可能会显示 GUID 或整数标识符。这些标识符不适合最终用户看到,可能会导致混淆。
using DevExpress.ExpressApp.DC;
// ...
[XafDefaultProperty(nameof(Subject))]
public class Task {
// ...
public string Subject { get; set; }
// ...
}
Alternatively, you can use the DefaultProperty attribute from the System.ComponentModel namespace.
或者,您可以使用 System.组件模型命名空间中的 DefaultProperty 属性。
Tip 提示
XAF can detect the default property automatically. If a property name is Name, or it includes the Name substring, then this property is considered default, and there is no need to specify the default property explicitly.
XAF 可以自动检测默认属性。如果属性名称为 Name,或者它包含 Name 子字符串,则此属性被视为默认值,并且无需显式指定默认属性。
Property Displayed in a Lookup Editor
在查找编辑器中显示的属性
The default property of a referenced business object is displayed in a Lookup Property Editor. If you need to use another property in lookups, use the IModelCommonMemberViewItem.LookupProperty property in the Model Editor.
引用的业务对象的默认属性显示在查找属性编辑器中。如果需要在查找中使用其他属性,请使用模型编辑器中的 IModelCommonMemberViewItem.查找属性。

How to: Specify a Display Member (for a Lookup Editor, Detail Form Caption, etc.)如何:指定显示成员(用于查找编辑器、详细信息表单标题等)的更多相关文章
- Display a Detail View with a List View 主子视图-列表视图与详细信息视图同时显示
In this lesson, you will learn how to display a Detail View together with a List View. For this purp ...
- display none隐藏后如果表单有数值,那么他的数值还存在!
以前以为display:none后他的值就不存在了, display:none隐藏后如果表单有数值,那么他的数值还存在.(项目出了问题!!) <!DOCTYPE html PUBLIC &quo ...
- 表单隐藏域与display:none
有时候前端进行表单填写是分步骤的,每一步的时候其他步骤相关的表单视图不可见: 针对"不可见",以下有两种处理方式: ①display:none 这种方式呢,比较简单,就是将三个步骤 ...
- 表单元素(控件)不可见,你用visibility还是display?(转)
属性大比拼:visibility和display的介绍 今天在做一个表单时涉及到这方面,当选中相应的选项后设置相应的几个元素(控件可见或不可见),后来还是用了visibility来实现.我们先来看下v ...
- from表单、css选择器、css组合器、字体样式、背景属性、边框设置、display设置
目录 一.form表单 1.form表单功能 2.表单使用原理 二.前端基础之css 1.关于css的介绍 2.css语法 3.三种编写CSS的方式 3.1.style内部直接编写css代码 3.2. ...
- Display PowerPoint slide show within a VB form or control window
The example below shows how to use VB form/control as a container application to display a PowerPoin ...
- Oracle从入门到精通(笔记)
一.Oracle11g概述 1.6 启动与关闭数据库实例 1.6.1 启动数据库实例 Oracle数据库实例启动分3个步骤:启动实例,加载数据库,打开数据库: 命令格式:startup [nomoun ...
- Use a Multiline Editor for String Properties 对字符串属性使用多行编辑器
In this lesson, you will learn how to display a multiline editor for string properties. For this pur ...
- Format a Property Value 设置属性值的格式
In this lesson, you will learn how to set a display format and an edit mask to a business class prop ...
随机推荐
- Python一秒搭建ftp服务器,帮助你在局域网共享文件【华为云技术分享】
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/devcloud/article/detai ...
- 一统江湖的大前端(8)- velocity.js 运动的姿势(上)
[摘要] 介绍CSS动画和JS动画的基本特点,以及轻量级动画库velocity.js的基本用法. 示例代码托管在:http://www.github.com/dashnowords/blogs 博客园 ...
- 学习之Redis(一)
一.redis简介 一般学习,最好先去官网,之所以建议看官网,是因为这是一手的学习资料,其他资料都最多只能算二手,一手资料意味着最权威,准确性最高.https://redis.io/topics/in ...
- hibernate的查询方式的介绍(一)
1.对象导航查询 2.OID查询 3.hql(hibernate query language)查询 4.QBC查询 5.本地sql查询 在这里先介绍其中两种 1.hibernate的对象导航查询 ( ...
- SI4432和SI1212通讯
SI4432是美国Silabs研发的一款工作频段低于1GHz的高性能射频收发芯片,属于其EzRadioPro系类.在国内已经广泛应用于工业.科研.医疗(ISM)以及短距离无线通信设备(SRD),其输出 ...
- Unity3D for iOS初级教程:Part 1/3(上)
转自:http://www.cnblogs.com/alongu3d/archive/ 如果图片看不到,请查看原文 这篇教材是来自教程团队成员 Christine Abernathy, 他是Faceb ...
- Balls in the Boxes
Description Mr. Mindless has many balls and many boxes,he wants to put all the balls into some of th ...
- 【CuteJavaScript】Angular6入门项目(3.编写服务和引入RxJS)
本文目录 一.项目起步 二.编写路由组件 三.编写页面组件 1.编写单一组件 2.模拟数据 3.编写主从组件 四.编写服务 1.为什么需要服务 2.编写服务 五.引入RxJS 1.关于RxJS 2.引 ...
- 【Selenium】selenium.common.exceptions.ElementClickInterceptedException
出现问题: 使用代码点击提交按钮: driver.find_element(By.CSS_SELECTOR,"#submit").click() 出现如下异常: selenium. ...
- Cloudflare Workers 部署跨域代理服务
项目源码:https://github.com/netnr/workers 发布链接:https://cors.zme.ink 使用文档:https://developers.cloudflare.c ...