IDataItemContainer Interface
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