Export (0) Print
Expand All

DataControlField.ExtractValuesFromCell Method

Extracts the value of the data control field from the current table cell and adds the value to the specified IDictionary collection.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

abstract ExtractValuesFromCell : 
        dictionary:IOrderedDictionary * 
        cell:DataControlFieldCell * 
        rowState:DataControlRowState * 
        includeReadOnly:bool -> unit  
override ExtractValuesFromCell : 
        dictionary:IOrderedDictionary * 
        cell:DataControlFieldCell * 
        rowState:DataControlRowState * 
        includeReadOnly:bool -> unit

Parameters

dictionary
Type: System.Collections.Specialized.IOrderedDictionary

An IOrderedDictionary.

cell
Type: System.Web.UI.WebControls.DataControlFieldCell

A DataControlFieldCell that contains the text or controls of the DataControlField.

rowState
Type: System.Web.UI.WebControls.DataControlRowState

One of the DataControlRowState values.

includeReadOnly
Type: System.Boolean

true to indicate that the values of read-only fields are included in the dictionary collection; otherwise, false.

The ExtractValuesFromCell method is implemented by types derived from DataControlField to associate the current field with a value, if applicable. The field/value pair is stored in the dictionary collection that is passed to the method. The ExtractValuesFromCell method is called by the ExtractRowValues method of data controls such as DetailsView and GridView.

Call this method when you are writing a custom data-bound control that uses DataControlFieldCell objects to assemble a set of cells and their associated values. Implement this method when you are writing a class derived from DataControlField that displays user data or data-bound data. Not all derived types implement the ExtractValuesFromCell method, because not all fields display user data. For example, the ButtonField control displays a button and has no user data.

The following code example demonstrates how to implement the ExtractValuesFromCell method for a control that derives from the DataControlField class. The RadioButtonField class renders a data-bound radio button for every row in a GridView control. When the ExtractValuesFromCell method is called, the method attempts to determine whether the current value of the RadioButton object contained in the cell is selected or cleared, and adds the value to the IDictionary collection. This code example is part of a larger example provided for the DataControlField class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft