ObjectListViewMode 枚举

定义

警告

此 API 现已过时。

指定对象列表的显示模式。Specifies the display mode of the object list. 此类不能被继承。This class cannot be inherited. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public enum class ObjectListViewMode
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see https://go.microsoft.com/fwlink/?LinkId=157231.")]
public enum ObjectListViewMode
type ObjectListViewMode = 
Public Enum ObjectListViewMode
继承
ObjectListViewMode
属性

字段

Commands 1

WML 中的命令视图。Command's view in WML. 当包含对象列表的页第一次呈现时,此视图作为默认视图显示。This is the default view displayed when the page containing the object list is rendered for the first time. 它由项的标签字段组成;如果 TableFields 不为空,则由一个表组成,视图的列与表字段对应,视图的行与项对应。It consists of either the label fields of the items, or (when TableFields is not empty) a table with columns corresponding to the table fields and rows corresponding to items. 如果 Details 视图中存在更多信息,则为显示 Details 视图的每一项呈现一个超链接,默认情况下链接的显示文字为 MoreWhen there is more information in the Details view, a hyperlink for each item displaying the Details view is rendered, by default reading More. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Details 2

详细信息视图。Details view. 此视图只在 WML 设备上呈现。This view is rendered separately only for WML devices. 它由一个具有 ObjectList 的命令的菜单以及一个显示 Details 视图的菜单项组成。It consists of a menu with the ObjectList's commands, along with an menu item displaying the Details view. 对于 HTML 设备,此视图与 Details 视图合并,命令作为超链接显示在详细信息的下面。For HTML devices, this view is combined with the Details view, with the commands appearing as hyperlinks below the details. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

List 0

列表视图。List view. 此视图显示项的每个字段,包括标题和值。This view displays each field of the item, including title and value. 在 HTML 中,此视图与 Commands 视图合并,命令作为超链接显示在详细信息的下面。In HTML, this view is combined with the Commands view, with the commands appearing as hyperlinks below the details. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

注解

显示模式通过 ViewMode 属性提供。The display mode is available through the ViewMode property. 此枚举允许用户设置 ObjectList 控件的当前显示模式。This enumeration allows the user to set the current display mode of the ObjectList control. 如果具有项模板的 ObjectList,则可以在每个项中放置一个按钮,处理按钮上的 click 事件,并将视图模式设置为 Details 视图以显示项详细信息。If you have an ObjectList with an item template, you can place a button in each item, handle the click event on the button, and set the view mode to the Details view to show the item details.

备注

在将此枚举设置为 CommandsDetails 视图之前,必须先选择一个项。You must first select an item before setting this enumeration to Commands or Details view. 尝试在选择项之前设置枚举会引发异常。An attempt to set the enumeration before selecting an item throws an exception.

适用于

另请参阅