FormView.ExtractRowValues(IOrderedDictionary, Boolean) 方法

定义

检索在数据行内声明的每个字段的值,并将这些值存储在指定的 IOrderedDictionary 对象中。Retrieves the values of each field declared within the data row and stores them in the specified IOrderedDictionary object.

protected:
 virtual void ExtractRowValues(System::Collections::Specialized::IOrderedDictionary ^ fieldValues, bool includeKeys);
protected virtual void ExtractRowValues (System.Collections.Specialized.IOrderedDictionary fieldValues, bool includeKeys);
abstract member ExtractRowValues : System.Collections.Specialized.IOrderedDictionary * bool -> unit
override this.ExtractRowValues : System.Collections.Specialized.IOrderedDictionary * bool -> unit
Protected Overridable Sub ExtractRowValues (fieldValues As IOrderedDictionary, includeKeys As Boolean)

参数

fieldValues
IOrderedDictionary

一个 IOrderedDictionary,用于存储当前数据项的字段值。An IOrderedDictionary used to store the field values of the current data item.

includeKeys
Boolean

如果包含键字段,则为 true;否则为 falsetrue to include key fields; otherwise, false.

注解

ExtractRowValues 方法是 FormView 控件调用的帮助器方法,用于检索在数据行中声明的每个字段的值。The ExtractRowValues method is a helper method called by the FormView control to retrieve the values of each field declared within the data row. 由于数据行基于当前模式显示不同的模板,因此此方法仅检索在与当前模式相对应的模板中声明的字段值。Because the data row displays a different template based on the current mode, this method retrieves only the field values declared in the template that corresponds to the current mode. 下表显示了可用的模式和相应的模板。The following table shows the available modes and the corresponding templates.

“模式”Mode 模板Template
InsertInsert InsertItemTemplate
编辑Edit EditItemTemplate
只读Read-only ItemTemplate

您可以使用 includeKeys 参数指定提取的值是否包含键字段。You can specify whether the extracted values include the key field or fields by using the includeKeys parameter.

继承者说明

扩展 FormView 类时,可以重写此方法以创建自己的例程来检索字段值。When extending the FormView class, you can override this method to create your own routine to retrieve the field values.

适用于

另请参阅