IDataItemContainer Interface
Enables data-bound control containers to identify a data item object for simplified data-binding operations.
Assembly: System.Web (in System.Web.dll)
The IDataItemContainer type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DataItem | When implemented, gets an object that is used in simplified data-binding operations. |
![]() | DataItemIndex | When implemented, gets the index of the data item bound to a control. |
![]() | DisplayIndex | When implemented, gets the position of the data item as displayed in a control. |
| Name | Description | |
|---|---|---|
![]() | EnableDynamicData(Type) | Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.) |
![]() | EnableDynamicData(Type, Object) | Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.) |
![]() | EnableDynamicData(Type, IDictionary<String, Object>) | Overloaded. Enables Dynamic Data behavior for the specified data control. (Defined by DataControlExtensions.) |
![]() | GetDefaultValues | Gets the collection of the default values for the specified data control. (Defined by DynamicDataExtensions.) |
![]() | GetMetaTable | Gets the table metadata for the specified data control. (Defined by DynamicDataExtensions.) |
![]() | SetMetaTable(MetaTable) | Overloaded. Sets the table metadata for the specified data control. (Defined by DynamicDataExtensions.) |
![]() | SetMetaTable(MetaTable, IDictionary<String, Object>) | Overloaded. Sets the table metadata and default value mapping for the specified data control. (Defined by DynamicDataExtensions.) |
![]() | SetMetaTable(MetaTable, Object) | Overloaded. Sets the table metadata and default value mapping for the specified data control. (Defined by DynamicDataExtensions.) |
![]() | TryGetMetaTable | Determines whether table metadata is available. (Defined by DynamicDataExtensions.) |
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.
| Topic | Location |
|---|---|
| How to: Access Members of a Web Server Control's Naming Container | Building ASP .NET Web Applications |
| How to: Access Members of a Web Server Control's Naming Container | Building ASP .NET Web Applications |
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.
The following code example demonstrates how to use the SimpleSpreadsheetControl and AccessDataSource control to display data in an Access database.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

