System.Web.UI.WebControls (system.web.dll)class

This class represents an individual item in the DataList control. You can access it through the DataList.Items collection or from a DataList event.

DataListItem inherits most of its properties from System.Web.UI.Control. In addition, it provides an ItemIndex that gives its index in the DataList.Items collection, an ItemType prop900erty that identifies what type of item this is (a header, footer, alternating row, etc.), and a DataItem property that returns the corresponding data item (such as a System.Data.DataRowView instance).

public class DataListItem : WebControl, System.Web.UI.INamingContainer {
// Public Constructors
   public DataListItem(int itemIndex, ListItemType itemType);
// Public Instance Properties
   public virtual object DataItem{set; get; }
   public virtual int ItemIndex{get; }
   public virtual ListItemType ItemType{get; }
// Public Instance Methods
   public virtual void RenderItem(System.Web.UI.HtmlTextWriter writer, bool extractRows, bool tableLayout);
// Protected Instance Methods
   protected override Style CreateControlStyle( );                // overrides WebControl
   protected override bool OnBubbleEvent(object source, EventArgs e); // overrides System.Web.UI.Control
   protected internal virtual void SetItemType(ListItemType itemType);


System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) WebControl(System.Web.UI.IAttributeAccessor) DataListItem(System.Web.UI.INamingContainer)

Returned By

DataList.{CreateItem( ), SelectedItem}, DataListCommandEventArgs.Item, DataListItemCollection.this, DataListItemEventArgs.Item

Passed To

DataList.InitializeItem( ), DataListCommandEventArgs.DataListCommandEventArgs( ), DataListItemEventArgs.DataListItemEventArgs( )

    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace