In this lesson, you will learn how to add an editor to a Detail View. For this purpose, the Department.Office property will be added to the Contact Detail View. You will also learn how to change the layout of a Detail View's editors.

在本课中,您将学习如何将编辑器添加到详细信息视图。为此,部门.Office 属性将添加到"联系人详细信息视图"。",因此,该部门将添加到"联系人详细信息视图"中。您还将学习如何更改详细信息视图编辑器的布局。

Note 注意
Before proceeding, take a moment to review the Place an Action in a Different Location lesson.

在继续之前,请花点时间复习"将操作置于不同位置"课程。

  • Invoke the Model Editor for the MySolution.Module project. Navigate to the Views | MySolution.Module.BusinessObjects node. Expand the Contact_DetailView child node. It contains the Items and Layout child nodes. To add an editor to a Contact Detail View, right-click the Items node and select Add | Property Editor.

  • 调用 MySolution.模块项目的模型编辑器。导航到视图 |MySolution.模块.业务对象节点。展开Contact_DetailView子节点。它包含"项"和"布局"子节点。要将编辑器添加到联系人详细信息视图,请右键单击"项目"节点并选择"添加 |属性编辑器。

  • For the new node, set the PropertyName and Id properties to "Department.Office".

  • 对于新节点,将属性名和 ID 属性设置为"部门.Office"。。

  • To display the new editor in a Contact Detail View, find the Layout node located under the Contact_DetailView node, expand its Layout | Main | SimpleEditors | Contact child node, right-click Contact_col2 and select Add | LayoutViewItem. For the new node, set the ViewItem and ID properties to "Department.Office".

  • 要在"联系人详细信息"视图中显示新编辑器,请查找位于Contact_DetailView节点下的布局节点,展开其布局 |主菜 |简单编辑器 |联系子节点,右键单击Contact_col2并选择"添加 |布局视图项。对于新节点,将 ViewItem 和 ID 属性设置为"部门.Office"。。

    Generally, you can place the editor in any layout group within the Layout node.

  • 通常,您可以将编辑器放在布局节点中的任何布局组中。
  • You can see how the new editor will be displayed in a Contact Detail View by selecting the Layout node. The property list to the right will be replaced with a design surface that imitates the Contact Detail View. You can drag the new editor to the required location if the current one does not satisfy your needs. For this purpose, right-click an empty space and choose Customize Layout. The Customization Form will be invoked. Now, you can drag items to the required locations. When finished, close the form. For details, refer to the Customize the View Items Layout topic.

  • 通过选择"布局"节点,您可以查看新编辑器在"联系人详细信息"视图中的显示方式。右侧的属性列表将替换为模仿"联系人详细信息视图"的设计图面。如果当前编辑器不能满足您的需要,则可以将新编辑器拖动到所需位置。为此,右键单击空白区域并选择"自定义布局"。将调用自定义窗体。现在,您可以将项目拖动到所需的位置。完成后,关闭窗体。有关详细信息,请参阅自定义视图项目布局主题。

To learn more about the Customization Form, the Layout Tree View tab and its context menu, refer to the Default Runtime Customization topic.

Run the WinForms or ASP.NET application and invoke a Contact Detail View. Notice the Office editor is located together with the Department editor, Position editor, etc.

要了解有关自定义窗体、布局树视图选项卡及其上下文菜单的详细信息,请参阅默认运行时自定义主题。
运行 WinForms 或ASP.NET应用程序并调用联系人详细信息视图。请注意,Office 编辑器与部门编辑器、职位编辑器等一起位于一起。

You can see the changes made in this lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

您可以在本课中为模型调用的模型编辑器中所做的更改。主演示模块项目。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

.

Note
Alternatively, you can customize the Contact Detail View layout at runtime, and then merge these customizations into the MySolution.Module project. Refer to the How to: Merge End-User Customizations into the XAF Solution topic for details.

Add an Editor to a Detail View 将编辑器添加到详细信息视图的更多相关文章

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

  3. Filter Lookup Editor Data Source 筛选器查找编辑器数据源

    In this lesson, you will learn how to filter the data displayed by a lookup editor. This editor is s ...

  4. How to add taxonomy element to a summary view?

    [re: Orchard CMS] This caused me scratching my head for days and now I can even feel it's bleeding. ...

  5. Add an Item to the Navigation Control 将项目添加到导航控件

    In this lesson, you will learn how to add an item to the navigation control. For this purpose, the N ...

  6. How to: Calculate a Property Value Based on Values from a Detail Collection 如何:基于详细信息集合中的值计算属性值

    This topic describes how to implement a business class, so that one of its properties is calculated ...

  7. Apply Grouping to List View Data 将分组应用于列表视图数据

    This lesson will teach you how to apply grouping to List View data. For this purpose, you will group ...

  8. 在 Laravel 中通过 Artisan View 扩展包创建及删除应用视图文件

    1.简介 本扩展包添加了两个视图相关的Artisan命令到Laravel应用,以便我们通过Artisan命令即可创建和管理视图文件,可谓是进一步解放了生产力. 2.安装 还是通过Composer安装: ...

  9. [转]How to add a script in a partial view in MVC4?

    本文转自:https://stackoverflow.com/questions/14114084/how-to-add-a-script-in-a-partial-view-in-mvc4 问题: ...

随机推荐

  1. Python提升“技术逼格”的6个方法

    1 列表生成式和生成器 from numpy import randoma = random.random(10000) lst = []for i in a: lst.append(i * i) # ...

  2. 对于prim的一个有趣但有点奇怪的想法

    prim算法找最小生成树适用于无向图,对于有向加权图会产生错误. 比如 1->2,8 1->3,8 2->3,4 3->2,3 最小生成树1->2->3 而不是3- ...

  3. Dubbo学习笔记-RPC扩展和本地Mock

    1.Dubbo介绍 Dubbo,一个是一款高性能Java RPC框架.私以为有中文官方文档,就不再重复介绍了 2.RPC扩展-本地存根stub RPC扩展功能:提前效验参数,缓存调用结果,日志记录等等 ...

  4. 前端小白webpack学习(四)

    .less文件与.scss文件使用与.css文件相仿 less-loader使用需要借助less插件,终端输入npm i less less-loader -D安装; sass-loader使用需要借 ...

  5. C# 多线程总结 异常处理 线程取消 锁(lock)

    那么什么时候能用多线程? 任务能并发的时候 多线程能干嘛?提升速度/优化用户体验 网站首页:A数据库 B接口 C分布式服务 D搜索引擎,适合多线程并发,都完成后才能返回给用户,需要等待WaitAll列 ...

  6. (八十一)c#Winform自定义控件-时间轴-HZHControls

    官网 http://www.hzhcontrols.com 前提 入行已经7,8年了,一直想做一套漂亮点的自定义控件,于是就有了本系列文章. GitHub:https://github.com/kww ...

  7. js-01-基础知识

    一.JS变量的声明.数据类型和变量的转换 1.js变量声明关键字:var 注意:a:js变量区分大小写: b:js中字符串可使用双引号,也可使用单引号: c:js中可声明同名变量,控制台不会报错,但后 ...

  8. Android开发之OkHttp介绍

    要论时下最火的网络请求框架,当属OkHttp了.自从Android4.4开始,google已经开始将源码中的HttpURLConnection替换为OkHttp,而在Android6.0之后的SDK中 ...

  9. 【好书推荐】《剑指Offer》之硬技能(编程题12~16)

    本文例子完整源码地址:https://github.com/yu-linfeng/BlogRepositories/tree/master/repositories/sword <[好书推荐]& ...

  10. LeetCode刷题191125

    博主渣渣一枚,刷刷leetcode给自己瞅瞅,大神们由更好方法还望不吝赐教.题目及解法来自于力扣(LeetCode),传送门. 今天状态不好,划一下水. 算法: 给定一个整数数组 nums 和一个目标 ...