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 ...
随机推荐
- 机器学习笔记(六) ---- 支持向量机(SVM)【华为云技术分享】
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/devcloud/article/detai ...
- AI如何驱动软件开发?华为云DevCloud 权威专家邀你探讨
近期,国际著名咨询公司Gartner 在一份研究报告中将 "AI-Driven Development" 列为 2019 年的 Top 10 Strategic Technolog ...
- 【nodejs原理&源码杂记(8)】Timer模块与基于二叉堆的定时器
[摘要] timers模块部分源码和定时器原理 示例代码托管在:http://www.github.com/dashnowords/blogs 一.概述 Timer模块相关的逻辑较为复杂,不仅包含Ja ...
- 转:linux 安装 Elasticsearch5.6.x 详细步骤以及问题解决方案
在网上有很多那种ES步骤和问题的解决 方案的,不过没有一个详细的整合,和问题的梳理:我就想着闲暇之余,来记录一下自己安装的过程以及碰到的问题和心得:有什么不对的和问题希望及时拍砖. 第一步:环境 li ...
- 为什么说 Java 中只有值传递?
对于初学者来说,要想把这个问题回答正确,是比较难的.在第二天整理答案的时候,我发现我竟然无法通过简单的语言把这个事情描述的很容易理解,遗憾的是,我也没有在网上找到哪篇文章可以把这个事情讲解的通俗易懂. ...
- luogu P3805 【模板】manacher算法
题目描述 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 字符串长度为n 输入格式 一行小写英文字符a,b,c...y,z组成的字符串S 输出格式 一个整数表示 ...
- [TimLinux] django WSGI入口分析及自定义WSGIHandler思路
1. 命令行启动 命令行是通过runserver子命令来启动的,对应的django模块为django.core.management.commands.runserver,调用关系结构: # 简化的运 ...
- Day 10 面向对象基础
目录 面对过程编程 面向对象编程 类 定义类 对象 定义对象 定制对象独有特征 面对过程编程 分析解决问题所需要的步骤, 用函数将这些步骤一步一步实现, 使用的时候一个个调用就可以了 优点: 复杂的问 ...
- Android中实现轮询下载安装应用的Dialog
前言 因为有涉及到静默安装,主要是针对已经root的设备,应需求,是在ARM的主板上开发的,所以对于常规手机仅能做到轮询下载,做不到静默安装. 效果图 用的鸿洋大神的百分比布局,各个分辨率都完美适配, ...
- ELK 理论小知识
ELK 是现阶段众多企业单位都在使用的一种日志分析系统,它能够方便的为我们收集你想要的日志并且展示出来 ELK是Elasticsearch.Logstash.Kibana的简称,这三者都是开源软件,通 ...