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)
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.
- AspNetHostingPermission
for operating in a hosted environment. Associated enumeration: Minimal
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.