C# Class Nettiers.AdventureWorks.Web.UI.EntityDropDownList

A specialised Drop Down List that adds extra functionality to the base class. Features include the ability to add a null item, make the control readonly, make the control required and it supports type ahead
Inheritance: System.Web.UI.WebControls.DropDownList
Exibir arquivo Open project: netTiers/netTiers Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
EntityDropDownList ( ) : System

Initializes a new instance of the T:EntityDropDownList class.

Validate ( ) : void

Calls the validate method on the embedded required validator if permitted

Protected Methods

Method Description
CreateChildControls ( ) : void

Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.

CreateControlCollection ( ) : System.Web.UI.ControlCollection

The base DropDownList class doesn't allow a child control collection. We'll override it so that we can have one for the validator.

OnDataBinding ( EventArgs e ) : void

Raises the event.

OnInit ( EventArgs e ) : void

Raises the event.

OnLoad ( EventArgs e ) : void

Handles the event.

Render ( System.Web.UI.HtmlTextWriter writer ) : void

Renders the control to the specified HTML writer.

RenderDropDownList ( System.Web.UI.HtmlTextWriter writer ) : void

Renders the drop down list.

RenderRequiredValidator ( System.Web.UI.HtmlTextWriter writer ) : void

Renders the required validator.

Method Details

CreateChildControls() protected method

Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
protected CreateChildControls ( ) : void
return void

CreateControlCollection() protected method

The base DropDownList class doesn't allow a child control collection. We'll override it so that we can have one for the validator.
protected CreateControlCollection ( ) : System.Web.UI.ControlCollection
return System.Web.UI.ControlCollection

EntityDropDownList() public method

Initializes a new instance of the T:EntityDropDownList class.
public EntityDropDownList ( ) : System
return System

OnDataBinding() protected method

Raises the event.
protected OnDataBinding ( EventArgs e ) : void
e System.EventArgs An object that contains the event data.
return void

OnInit() protected method

Raises the event.
protected OnInit ( EventArgs e ) : void
e System.EventArgs An object that contains the event data.
return void

OnLoad() protected method

Handles the event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs An object that contains event data.
return void

Render() protected method

Renders the control to the specified HTML writer.
protected Render ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The object that receives the control content.
return void

RenderDropDownList() protected method

Renders the drop down list.
protected RenderDropDownList ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The writer.
return void

RenderRequiredValidator() protected method

Renders the required validator.
protected RenderRequiredValidator ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The writer.
return void

Validate() public method

Calls the validate method on the embedded required validator if permitted
public Validate ( ) : void
return void