System.Web
2.0.0.0
System.Object
System.Web.UI.IDataSourceViewSchemaAccessor
System.Web.UI.IStateManager
System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))
System.ComponentModel.DefaultProperty("HeaderText")
The class serves as the base class for all data control field types. Data control fields are used by data-bound controls to represent a field of data, similar to how a object represents a type of column in the control.
Use the classes that are derived from to control how a field of data is displayed in a data-bound control such as or . The following table lists the different data control field types provided by ASP.NET.
-
Column field type
Description
-
Displays the value of a field in a data source as text.
-
Displays a command button in a data-bound control. Depending on the control, this allows you to display either a row or a column with a custom button control, such as an Add or a Remove button.
-
Displays a check box in a data-bound control. This data control field type is commonly used to display fields with a Boolean value.
-
Displays built-in command buttons to perform edit, insert, or delete operations in a data-bound control.
-
Displays the value of a field in a data source as a hyperlink. This data control field type allows you to bind a second field to the hyperlink's URL.
-
Displays an image in a data-bound control.
-
Displays user-defined content in a data-bound control according to a specified template.
You can also extend the and classes to create your own data control field types.
The class provides many properties that determine how user interface (UI) elements are presented in the data-bound control. Not every control uses every available data control field property when rendering a UI. For example, the control, which displays the data control fields as rows, includes a header item for each data control field, but no footer item. Therefore, the and properties are ignored by the control. The control, however, uses the and properties if the property is set to true. Similarly, the data control field properties affect the presentation of UI elements depending on what the element is. The property is always applied to the field. If the type derived from contains a control, as in the or classes, the property is applied to the field.
Serves as the base class for all data control field types, which represent a column of data in tabular data-bound controls such as and .
Constructor
Because the class is abstract, you cannot create a object directly. This constructor is commonly called by the constructor of a derived class to initialize the properties defined in the class.
Initializes a new instance of the class.
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue("")
System.String
To be added.
The method is called to raise a state change event when the property is set.
The value of the property is stored in view state.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.
Gets or sets text that is rendered as the AbbreviatedText property value in some controls.
2.0.0.0
Method
2.0.0.0
System.Web.UI.WebControls.DataControlField
The method is a helper method used by the method to create a copy of the current -derived object.
Creates a duplicate copy of the current -derived object.
A duplicate copy of the current .
Property
System.Web.UI.Control
To be added.
The reference is set when the method is called.
Gets a reference to the data control that the object is associated with.
2.0.0.0
Property
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.ComponentModel.DefaultValue(null)
System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
System.Web.UI.WebControls.Style
To be added.
The property governs the appearance of any Web server controls contained by types derived from .
This property does not affect all derived types. The control, which typically displays text data and contains only controls, is only affected by the property when in state. Web server controls such as and might be affected by the property, depending on the specific configuration of the control object instances contained by the field. For example, the control can be rendered as a , , or object. Although a control is affected by font attributes of the specified object, a control is not.
Gets the style of any Web server controls contained by the object.
2.0.0.0
Method
System.Void
The method is a helper method used by the method to copy the properties of the current -derived object to the object created by the method.
Copies the properties of the current -derived object to the specified object.
The to which to copy the properties of the current .
2.0.0.0
Method
System.Web.UI.WebControls.DataControlField
The method is a helper method used by the method to create an empty -derived object to copy the properties of the current -derived object into.
When overridden in a derived class, creates an empty -derived object.
An empty -derived object.
2.0.0.0
Property
System.Boolean
To be added.
The property exposes the property. The instance that is passed to the method is used.
Gets a value indicating whether a data control field is currently viewed in a design-time environment.
2.0.0.0
Method
System.Void
The method is implemented by types derived from to associate the current field with a value, if applicable. The field/value pair is stored in the collection that is passed to the method. The method is called by the ExtractRowValues method of data controls such as and .
Call this method when you are writing a custom data-bound control that uses objects to assemble a set of cells and their associated values. Implement this method when you are writing a class derived from that displays user data or data-bound data. Not all derived types implement the method, because not all fields display user data. For example, the control displays a button and has no user data.
Extracts the value of the data control field from the current table cell and adds the value to the specified collection.
An .
A that contains the text or controls of the .
One of the values.
true to indicate that the values of read-only fields are included in the collection; otherwise, false.
2.0.0.0
Property
System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.ComponentModel.DefaultValue(null)
System.Web.UI.WebControls.TableItemStyle
To be added.
The property governs the appearance of any text displayed in the footer item of a type derived from .
Some data-bound controls do not render a footer item for a data control field. For example, the control displays its data control fields as rows. A footer item is not rendered for these data control fields. The property is ignored in these controls.
Gets or sets the style of the footer of the data control field.
2.0.0.0
Property
System.ComponentModel.DefaultValue("")
System.ComponentModel.Localizable(true)
System.String
To be added.
Use the property to add notes or comments to a data control field, or for other data related to the field.
Some data-bound controls do not render a footer item for a data control field. For example, the control displays its data control fields as rows. A footer item is not rendered for these data control fields. The property is ignored in these controls.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.
Gets or sets the text that is displayed in the footer item of a data control field.
2.0.0.0
Property
System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.ComponentModel.DefaultValue("")
System.Web.UI.UrlProperty
System.String
To be added.
Set the property when you want an image displayed in the header item of a data control instead of header text.
If both the and properties are set, the property has precedence.
Gets or sets the URL of an image that is displayed in the header item of a data control field.
2.0.0.0
Property
System.ComponentModel.DefaultValue(null)
System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.Web.UI.WebControls.TableItemStyle
To be added.
The property governs the appearance of any text displayed in the header item of a type derived from . The most common application of the property is to alter the style of the column headers in a control.
Gets or sets the style of the header of the data control field.
2.0.0.0
Property
System.ComponentModel.Localizable(true)
System.ComponentModel.DefaultValue("")
System.String
To be added.
Use the property to identify a field in a data control with a friendly name. The most common application of the property is to provide meaningful column names for data-bound fields in a or control.
If both the and properties are set, the property has precedence.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.
Gets or sets the text that is displayed in the header item of a data control field.
2.0.0.0
Method
System.Boolean
The control that the object is associated with calls the method to initialize the field before it is added to a rows collection. Data controls such as and call the method in their CreateChildControls methods before calling other methods such as CreateRow to create specific rows with data.
Call this method when you are writing a custom data-bound control that uses objects to perform basic initialization for any objects. Implement this method if your derived type requires any object initialization before it populates objects with data or controls in the method.
Performs basic instance initialization for a data control field.
Always returns false.
A value that indicates whether the control supports the sorting of columns of data.
The data control that owns the .
2.0.0.0
Method
System.Void
Types derived from implement the method to add text and controls to a object that belongs to a data control that uses tables to display a user interface (UI). These data controls create the complete table structure row by row when their respective CreateChildControls methods are called. The method is called by the InitializeRow method of data controls such as and .
Call this method when you are writing a custom data-bound control that uses objects to initialize the cells of the table structure with data or controls. Implement this method when you are writing a class derived from .
Adds text or controls to a cell's controls collection.
A that contains the text or controls of the .
One of the values.
One of the values, specifying the state of the row that contains the .
The index of the row that the is contained in.
2.0.0.0
Property
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
A data-bound control is in insert mode when the state of the current display row is .
The control checks the value of this property before it renders a set of fields. If the property is false, the property of the object is set to false.
The value of the property is stored in view state.
Gets a value indicating whether the object is visible when its parent data-bound control is in insert mode.
2.0.0.0
Property
System.Boolean
To be added.
To be added.
Gets a value indicating whether the object is saving changes to its view state.
2.0.0.0
Property
System.ComponentModel.DefaultValue(null)
System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
System.Web.UI.WebControls.TableItemStyle
To be added.
The property governs the appearance of any text data displayed by a type derived from . For example, when you bind a control to text data, you can use the property to alter the appearance of the text that is displayed.
Gets the style of any text-based content displayed by a data control field.
2.0.0.0
Method
System.Void
This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.
This method restores view-state information for the object from a previous page request that was saved by the method.
Restores the data source view's previously saved view state.
An object that represents the state to restore.
2.0.0.0
Method
System.Void
The method raises an event signaling that the object's state has changed. Changes to the following properties cause this event to be raised: , , , , , and . Derived type properties also raise this event when state changes occur. Web server controls such as and typically call the DataBind method in response to a field change event.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Raises the FieldChanged event.
2.0.0.0
Method
System.Object
This method is used primarily by control developers.
View state is the accumulation of the values of a server control's properties. These values are automatically placed in the server control's property, which is an instance of the class. This property's value is then persisted to a string object after the save state stage of the server control life cycle.
When view state is saved, a string is returned to the client as a variable that is stored in an HTML hidden element. When you author custom server controls, you can improve efficiency by overriding this method and modifying your server control's property. For more information, see View State Overview.
Saves the changes made to the view state since the time the page was posted back to the server.
The object that contains the changes to the view state. If there is no view state associated with the object, this method returns null.
2.0.0.0
Property
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
Use the property to specify whether the header item is displayed in a object.
Gets or sets a value indicating whether the header item of a data control field is rendered.
2.0.0.0
Property
System.ComponentModel.DefaultValue("")
System.String
To be added.
The method is called to raise a state change event when the property is set.
The value of the property is stored in view state.
Gets or sets a sort expression that is used by a data source control to sort data.
2.0.0.0
Property
2.0.0.0
System.Object
To be added.
To be added.
To be added.
Property
2.0.0.0
System.Boolean
To be added.
To be added.
Gets a value indicating whether the object is saving changes to its view state.
Method
2.0.0.0
System.Void
To be added.
To be added.
Restores the data control field's previously saved view state.
Method
2.0.0.0
System.Object
To be added.
Saves the changes made to the view state since the time the page was posted back to the server.
An that contains the saved view state values for the control.
Method
2.0.0.0
System.Void
To be added.
Causes the object to track changes to its view state so they can be stored in the control's property and persisted across requests for the same page.
Method
System.String
This method is implemented to return the value of the property, if the property is set. Otherwise, this method simply returns a string that represents the type of the data control field (for example, "BoundField").
Returns a string that represents this object.
A string that represents this .
2.0.0.0
Method
System.Void
To be added.
Causes the object to track changes to its view state so they can be stored in the control's property and persisted across requests for the same page.
2.0.0.0
Method
System.Void
The method is a helper method used to determine whether the controls contained in a object support callbacks. The base implementation of this method has been implemented to throw a exception to indicate that callbacks are not supported.
This method is used primarily by control developers.
When overridden in a derived class, signals that the controls contained by a field support callbacks.
2.0.0.0
Property
System.Web.UI.StateBag
To be added.
A data control field's view state is the accumulation of all its property values. To preserve these values across HTTP requests, ASP.NET server controls use this property, which is an instance of the class, to store the property values. The values are then passed as a variable to an HTML hidden input element when subsequent requests are processed. For more information about saving server control view state, see View State Overview.
View state is enabled for all server controls by default, but there are circumstances when you will want to disable it. For more information, see Performance Overview.
For more information about dictionaries and how to use them, see Grouping Data in Collections.
Gets a dictionary of state information that allows you to save and restore the view state of a object across multiple requests for the same page.
2.0.0.0
Property
System.ComponentModel.DefaultValue(true)
System.Boolean
To be added.
Use the property to show or hide objects in a data-bound control.
If the the property is false, the data values are not displayed and do not make a round-trip to the client. If you want to round-trip the data for a field that is not visible, add the field name to the DataKeyNames property of the data-bound control.
Gets or sets a value indicating whether a data control field is rendered.
2.0.0.0