当前位置: 首页> 文旅> 文化 > 学习008-02-04-05 Make a List View Editable(使列表视图可编辑)

学习008-02-04-05 Make a List View Editable(使列表视图可编辑)

时间:2025/7/10 7:53:10来源:https://blog.csdn.net/thomastang200912_126/article/details/140686747 浏览次数:0次

Make a List View Editable(使列表视图可编辑)

This lesson explains how to make a List View editable.
本课介绍如何使列表视图可编辑。

The instructions below show how to create new objects of the DemoTask type directly in the Task List View.
下面的说明展示了如何直接在任务列表视图中创建DemoTask类型的新对象。

Step-by-Step Instructions(分步说明)

1.In the MySolution.Module project, open the Model.DesignedDiffs.xafml file in the Model Editor. Navigate to the Views | MySolution.Module.BusinessObjects | DemoTask | DemoTask_ListView node. Set the AllowEdit property of this node to True.
在MySolutions. Module项目中,在Model Editor中打开Model.DesignedDiffs.xafml文件。导航到Views|MySolutions.Module.BusinessObjects|DemoTask|DemoTask_ListView节点。将此节点的AllowEdit属性设置为True。

When the application renders a List View in edit mode, you can create new objects directly in the List View. To add this functionality, set the NewItemRowPosition property to Top or Bottom.
当应用程序在编辑模式下呈现列表视图时,您可以直接在列表视图中创建新对象。要添加此功能,请将NewItemRowPoplace属性设置为Top或Bottom。
在这里插入图片描述

2.Run the application and edit one of the Task objects in the List View:
运行应用程序并编辑列表视图中的任务对象之一:

ASP.NET Core Blazor
在这里插入图片描述

To show property editors in a grid row, click the Edit button in that row.
要在网格行中显示属性编辑器,请单击该行中的编辑按钮。

To create a new object in this List View, click the New button in the grid header.
要在此列表视图中创建新对象,请单击网格标题中的新建按钮。

Windows Forms
在这里插入图片描述

To create a new object in this List View, click the empty row directly below the grid header.
要在此列表视图中创建新对象,请单击网格标题正下方的空行。

Tip
List Views in DataView, ServerView, and InstantFeedbackView data access modes do not support this functionality.
DataView、ServerView和InstantFeedbackView数据访问模式中的列表视图不支持此功能。
To enable the edit mode for a List View in code, add the DefaultListViewOptionsAttribute attribute to the DemoTask class.
要在代码中启用列表视图的编辑模式,请将DefaultListViewOptionsAttribute属性添加到DemoTask类。

Next Lesson(下一课)

Access the Settings of a Property Editor in a Detail View
在详细信息视图中访问属性编辑器的设置

关键字:学习008-02-04-05 Make a List View Editable(使列表视图可编辑)

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: