ListView.ExtractItemValues(IOrderedDictionary, ListViewItem, Boolean) 方法
定义
检索在指定项中声明的每个字段的值,并将它们存储在指定的 IOrderedDictionary 对象中。Retrieves the values of each field that is declared in the specified item, and stores them in the specified IOrderedDictionary object.
public:
virtual void ExtractItemValues(System::Collections::Specialized::IOrderedDictionary ^ itemValues, System::Web::UI::WebControls::ListViewItem ^ item, bool includePrimaryKey);
public virtual void ExtractItemValues (System.Collections.Specialized.IOrderedDictionary itemValues, System.Web.UI.WebControls.ListViewItem item, bool includePrimaryKey);
abstract member ExtractItemValues : System.Collections.Specialized.IOrderedDictionary * System.Web.UI.WebControls.ListViewItem * bool -> unit
override this.ExtractItemValues : System.Collections.Specialized.IOrderedDictionary * System.Web.UI.WebControls.ListViewItem * bool -> unit
Public Overridable Sub ExtractItemValues (itemValues As IOrderedDictionary, item As ListViewItem, includePrimaryKey As Boolean)
参数
- itemValues
- IOrderedDictionary
一个字典对象,用于存储字段值。A dictionary object that is used to store the field values.
- item
- ListViewItem
要从中检索字段值的 ListViewItem 对象。The ListViewItem object from which to retrieve the field values.
- includePrimaryKey
- Boolean
true 表示包含主键字段;否则为 false。true to include the primary key field or fields; otherwise, false.
例外
itemValues 为 null。itemValues is null.
item 不是 ListViewDataItem 对象。item is not a ListViewDataItem object.
注解
ExtractItemValues方法是一个帮助器方法,该方法由 ListView 控件调用以检索中声明的每个字段的值 item 。The ExtractItemValues method is a helper method that is called by the ListView control to retrieve the values of each field that is declared in item. 可以通过使用参数来指定提取的值是否包含键字段 includePrimaryKey 。You can specify whether the extracted values include key fields by using the includePrimaryKey parameter.