JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Immediate Solutions: Using the BaseDataList Class

The BaseDataList class acts as the abstract base class for the DataList and DataGrid classes. Here is the inheritance hierarchy of this class:

Object
   Control
      WebControl
         BaseDataList

You can find the notable public properties of BaseDataList objects in Table 23.1, their notable methods in Table 23.2, and their notable events in Table 23.3. Note that as with other Web server controls, I am not listing the notable properties, methods, and events this class inherits from the Control and WebControl classes—you can find them in Chapter 15, Tables 15.1 to 15.5.

Table 23.1: Noteworthy public properties of BaseDataList objects.

Property

Means

CellPadding

Gets/sets the cell padding used in the display.

CellSpacing

Gets/sets the cell spacing used in the display.

DataKeyField

Gets/sets the primary key field in the data source.

DataKeys

Gets the key fields in the data source.

DataMember

Gets/sets the data member to bind to.

DataSource

Gets/sets the source to a list of data to use.

GridLines

Gets/sets grid line styles.

HorizontalAlign

Gets/sets horizontal alignment of the control.

Table 23.2: Noteworthy public methods of BaseDataList objects.

Method

Means

DataBind

Binds the control to the data source.

Table 23.3: Noteworthy public events of BaseDataList objects.

Event

Means

SelectedIndexChanged

Occurs when an item is selected.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor