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.)如何:指定显示成员(用于查找编辑器、详细信息表单标题等)的更多相关文章

  1. 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 ...

  2. display none隐藏后如果表单有数值,那么他的数值还存在!

    以前以为display:none后他的值就不存在了, display:none隐藏后如果表单有数值,那么他的数值还存在.(项目出了问题!!) <!DOCTYPE html PUBLIC &quo ...

  3. 表单隐藏域与display:none

    有时候前端进行表单填写是分步骤的,每一步的时候其他步骤相关的表单视图不可见: 针对"不可见",以下有两种处理方式: ①display:none 这种方式呢,比较简单,就是将三个步骤 ...

  4. 表单元素(控件)不可见,你用visibility还是display?(转)

    属性大比拼:visibility和display的介绍 今天在做一个表单时涉及到这方面,当选中相应的选项后设置相应的几个元素(控件可见或不可见),后来还是用了visibility来实现.我们先来看下v ...

  5. from表单、css选择器、css组合器、字体样式、背景属性、边框设置、display设置

    目录 一.form表单 1.form表单功能 2.表单使用原理 二.前端基础之css 1.关于css的介绍 2.css语法 3.三种编写CSS的方式 3.1.style内部直接编写css代码 3.2. ...

  6. 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 ...

  7. Oracle从入门到精通(笔记)

    一.Oracle11g概述 1.6 启动与关闭数据库实例 1.6.1 启动数据库实例 Oracle数据库实例启动分3个步骤:启动实例,加载数据库,打开数据库: 命令格式:startup [nomoun ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. Redis Cluster 自动化安装,扩容和缩容

    Redis Cluster 自动化安装,扩容和缩容 之前写过一篇基于python的redis集群自动化安装的实现,基于纯命令的集群实现还是相当繁琐的,因此官方提供了redis-trib.rb这个工具虽 ...

  2. 通过lib生成pom坐标

    package com.jinloooong.demo.util; import com.alibaba.fastjson.JSONObject; import org.dom4j.Element; ...

  3. 严格次短路的求法-spfa

    #include<iostream> #include<cstdio> #include<algorithm> #include<queue> #inc ...

  4. 移动前端不得不了解的HTML5 head 头标签 —— HTML基本的头部标签

    HTML的头部内容特别多,有针对SEO的头部信息,也有针对移动设备的头部信息.而且各个浏览器内核以及各个国内浏览器厂商都有些自己的标签元素,有很多差异性.移动端的工作已经越来越成为前端工作的重要内容, ...

  5. [TimLinux] JavaScript 判断 input checkbox选中的方法

    1. input属性 <label> <span>选择</span> <input type="checkbox" name=" ...

  6. CoderForces985F-Isomorphic Strings

    F. Isomorphic Strings time limit per test 3 seconds memory limit per test 256 megabytes input standa ...

  7. 【译】Visual Studio 2019 中 WPF & UWP 的 XAML 开发工具新特性

    原文 | Dmitry 翻译 | 郑子铭 自Visual Studio 2019推出以来,我们为使用WPF或UWP桌面应用程序的XAML开发人员发布了许多新功能.在本周的 Visual Studio ...

  8. 洛谷 题解 P1351 【联合权值】

    Problem P1351 [联合权值] record 用时: 99ms 空间: 13068KB(12.76MB) 代码长度: 3.96KB 提交记录: R9883701 注: 使用了 o1 优化 o ...

  9. 合成语音 TTS

    弄了一天的合成语音 感觉好难受,明明这么简单的事情非弄得要这么复杂.... 引入命名空间 或者 导入命名空间 代码: using System; using System.Collections.Ge ...

  10. 【关注图像采集视频传输】之 Cy3014 usb3.0 FIFO接口

    CYUSB3014延续了CY7C68013A最吸引人的地方,那就是实现高速数据传输的Slave FIFO接口,应用这种模式,据说数据传输率可以达到320MB/s. 同USB2.0的芯片CY7C6801 ...