C# Class Rock.Web.UI.Controls.ItemPicker

Inheritance: System.Web.UI.WebControls.CompositeControl, IRockControl
Exibir arquivo Open project: SparkDevNetwork/Rock

Private Properties

Property Type Description

Public Methods

Method Description
ItemPicker ( ) : System

Initializes a new instance of the ItemPicker class.

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

This is where you implment the simple aspects of rendering your control. The rest will be handled by calling RenderControlHelper's RenderControl() method.

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

Outputs server control content to a provided T:System.Web.UI.HtmlTextWriter object and stores tracing information about the control if tracing is enabled.

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

Render any additional picker actions

SelectedValueAsId ( ) : int?

Returns the value of the currently selected item. It will return NULL if either T:Rock.Constants.None or T:Rock.Constants.All is selected. />

SelectedValueAsInt ( bool noneAsNull = true ) : int?

Gets the selected value as an integer, returning NULL if the selected value is "0"

SelectedValuesAsInt ( ) : IEnumerable

Selecteds the values as int.

SetValue ( int id ) : void

Sets the value.

SetValues ( IEnumerable ids ) : void

Sets the values.

ShowErrorMessage ( string errorMessage ) : void

Shows the error message.

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.

OnInit ( EventArgs e ) : void

Raises the E:System.Web.UI.Control.Init event.

OnLoad ( EventArgs e ) : void

Raises the E:System.Web.UI.Control.Load event.

RegisterJavaScript ( ) : void

Registers the java script.

SetValueOnSelect ( ) : void

Sets the value on select.

SetValuesOnSelect ( ) : void

Sets the values on select.

btnSelect_Click ( object sender, EventArgs e ) : void

Handles the Click event of the _btnSelect control.

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

ItemPicker() public method

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

OnInit() protected method

Raises the E:System.Web.UI.Control.Init event.
protected OnInit ( EventArgs e ) : void
e System.EventArgs An object that contains the event data.
return void

OnLoad() protected method

Raises the E:System.Web.UI.Control.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs The object that contains the event data.
return void

RegisterJavaScript() protected method

Registers the java script.
protected RegisterJavaScript ( ) : void
return void

RenderBaseControl() public method

This is where you implment the simple aspects of rendering your control. The rest will be handled by calling RenderControlHelper's RenderControl() method.
public RenderBaseControl ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The writer.
return void

RenderControl() public method

Outputs server control content to a provided T:System.Web.UI.HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
public RenderControl ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The object that receives the control content.
return void

RenderCustomPickerActions() public method

Render any additional picker actions
public RenderCustomPickerActions ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The writer.
return void

SelectedValueAsId() public method

Returns the value of the currently selected item. It will return NULL if either T:Rock.Constants.None or T:Rock.Constants.All is selected. />
public SelectedValueAsId ( ) : int?
return int?

SelectedValueAsInt() public method

Gets the selected value as an integer, returning NULL if the selected value is "0"
public SelectedValueAsInt ( bool noneAsNull = true ) : int?
noneAsNull bool if set to true [none as null].
return int?

SelectedValuesAsInt() public method

Selecteds the values as int.
public SelectedValuesAsInt ( ) : IEnumerable
return IEnumerable

SetValue() public method

Sets the value.
public SetValue ( int id ) : void
id int The id.
return void

SetValueOnSelect() protected abstract method

Sets the value on select.
protected abstract SetValueOnSelect ( ) : void
return void

SetValues() public method

Sets the values.
public SetValues ( IEnumerable ids ) : void
ids IEnumerable The ids.
return void

SetValuesOnSelect() protected abstract method

Sets the values on select.
protected abstract SetValuesOnSelect ( ) : void
return void

ShowErrorMessage() public method

Shows the error message.
public ShowErrorMessage ( string errorMessage ) : void
errorMessage string The error message.
return void

btnSelect_Click() protected method

Handles the Click event of the _btnSelect control.
protected btnSelect_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
return void