Export (0) Print
Expand All

IDataItemContainer Interface

Enables data-bound control containers to identify a data item object for simplified data-binding operations.

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

public interface class IDataItemContainer : INamingContainer

The IDataItemContainer type exposes the following members.

  NameDescription
Public propertyDataItemWhen implemented, gets an object that is used in simplified data-binding operations.
Public propertyDataItemIndexWhen implemented, gets the index of the data item bound to a control.
Public propertyDisplayIndexWhen implemented, gets the position of the data item as displayed in a control.
Top

  NameDescription
Public Extension MethodEnableDynamicData(Type)Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.)
Public Extension MethodEnableDynamicData(Type, Object)Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.)
Public Extension MethodEnableDynamicData(Type, IDictionary<String, Object>)Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.)
Public Extension MethodGetDefaultValuesGets the collection of the default values for the specified data control. (Defined by DynamicDataExtensions.)
Public Extension MethodGetMetaTableGets the table metadata for the specified data control. (Defined by DynamicDataExtensions.)
Public Extension MethodSetMetaTable(MetaTable)Overloaded. Sets the table metadata for the specified data control. (Defined by DynamicDataExtensions.)
Public Extension MethodSetMetaTable(MetaTable, IDictionary<String, Object>)Overloaded. Sets the table metadata and default value mapping for the specified data control. (Defined by DynamicDataExtensions.)
Public Extension MethodSetMetaTable(MetaTable, Object)Overloaded. Sets the table metadata and default value mapping for the specified data control. (Defined by DynamicDataExtensions.)
Public Extension MethodTryGetMetaTableDetermines whether table metadata is available. (Defined by DynamicDataExtensions.)
Top

Container classes that implement the IDataItemContainer interface can specify which of their properties identifies the data item for data-binding operations, such as late binding with the DataBinder class.

The following code example demonstrates how to use the IDataItemContainer interface. The SimpleSpreadsheetControl is a control that displays tabular-style data, similar to a DataGrid or GridView control. It contains a set of SimpleSpreadsheetRow objects.

The SimpleSpreadsheetRow class is a container class that implements the IDataItemContainer interface. Although in this example the data item property is intuitively named Data, the DataItem property can be implemented to map to any property or return value of a method.

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

The following code example demonstrates how to use the SimpleSpreadsheetControl and AccessDataSource control to display data in an Access database.

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