Anthem.RadioButtonList Class Reference

Creates an updatable list control that encapsulates a group of radio button controls. More...

Inheritance diagram for Anthem.RadioButtonList:

Anthem.IUpdatableControl Anthem.ICallBackControl List of all members.

Public Member Functions

override void RenderControl (HtmlTextWriter writer)
 Forces the server control to output content and trace information.

Protected Member Functions

override void OnSelectedIndexChanged (EventArgs e)
 Excecutes System.Web.UI.WebControls.BaseDataList.OnSelectedIndexChanged, then sets UpdateAfterCallBack to true.
override void RenderItem (ASP.ListItemType itemType, int repeatIndex, ASP.RepeatInfo repeatInfo, HtmlTextWriter writer)
 Adds the onclick attribute to each item to invoke a callback from the client, then renders the item.
override void OnPreRender (EventArgs e)
override void Render (HtmlTextWriter writer)
 Renders the server control wrapped in an additional element so that the element.innerHTML can be updated after a callback.
override void OnLoad (EventArgs e)
 Raises the System.Web.UI.Control.Load event and registers the control with Anthem.Manager.

Properties

[DefaultValue(false)] bool AutoCallBack [get, set]
 Gets or sets a value indicating whether the Checkbox state automatically calls back to the server when clicked. Mimics the AutoPostBack property.
[Category("Default")][DefaultValue("")][MergableProperty(false)][PersistenceMode(PersistenceMode.InnerProperty)]
override ASP.ListItemCollection 
Items [get]
 Override Items collection to force PersistenceMode.InnerProperty. This will cause the control to wrap the ListItems inside of an <Items> tag which the Visual Studio designer will validate. If you don't do this, the designer will complain that the "Element 'ListItem' is not a known element.".
[Category("Anthem")][DefaultValue("")][Description("The javascript
function to call on the client
if the callback is cancelled.")]
virtual string 
CallBackCancelledFunction [get, set]
 Gets or sets the javascript function to execute on the client if the callback is cancelled. See PreCallBackFunction.
[Category("Anthem")][DefaultValue(true)][Description("True
if this control uses callbacks
instead of postbacks to post
data to the server.")] virtual
bool 
EnableCallBack [get, set]
 Gets or sets a value indicating whether the control uses callbacks instead of postbacks to post data to the server.
[Category("Anthem")][DefaultValue(true)][Description("True
if this control is enabled
on the client during callbacks.")]
virtual bool 
EnabledDuringCallBack [get, set]
 Gets or sets a value indicating whether the control is enabled on the client during callbacks.
[Category("Anthem")][DefaultValue("")][Description("The javascript
function to call on the client
after the callback response
is received.")] virtual string 
PostCallBackFunction [get, set]
 Gets or sets the javascript function to execute on the client after the callback response is received.
[Category("Anthem")][DefaultValue("")][Description("The javascript
function to call on the client
before the callback is made.")]
virtual string 
PreCallBackFunction [get, set]
 Gets or sets the javascript function to execute on the client before the callback is made.
[Category("Anthem")][DefaultValue("")][Description("The text
to display during the callback.")]
virtual string 
TextDuringCallBack [get, set]
 Gets or sets the text to display on the client during the callback.
[Category("Anthem")][DefaultValue(false)][Description("True
if this control should be
updated after each callback.")]
virtual bool 
AutoUpdateAfterCallBack [get, set]
 Gets or sets a value indicating whether the control should be updated after each callback. Also see UpdateAfterCallBack.
[Browsable(false)][DefaultValue(false)] virtual bool UpdateAfterCallBack [get, set]
 Gets or sets a value which indicates whether the control should be updated after the current callback. Also see AutoUpdateAfterCallBack.
override bool Visible [get, set]
 Overrides the Visible property so that Anthem.Manager can track the visibility.

Detailed Description

Creates an updatable list control that encapsulates a group of radio button controls.

Definition at line 16 of file RadioButtonList.cs.


Member Function Documentation

override void Anthem.RadioButtonList.OnSelectedIndexChanged ( EventArgs  e  )  [protected]

Excecutes System.Web.UI.WebControls.BaseDataList.OnSelectedIndexChanged, then sets UpdateAfterCallBack to true.

Definition at line 61 of file RadioButtonList.cs.

override void Anthem.RadioButtonList.RenderItem ( ASP.ListItemType  itemType,
int  repeatIndex,
ASP.RepeatInfo  repeatInfo,
HtmlTextWriter  writer 
) [protected]

Adds the onclick attribute to each item to invoke a callback from the client, then renders the item.

Definition at line 72 of file RadioButtonList.cs.

override void Anthem.RadioButtonList.Render ( HtmlTextWriter  writer  )  [protected]

Renders the server control wrapped in an additional element so that the element.innerHTML can be updated after a callback.

Definition at line 133 of file RadioButtonList.cs.

override void Anthem.RadioButtonList.OnLoad ( EventArgs  e  )  [protected]

Raises the System.Web.UI.Control.Load event and registers the control with Anthem.Manager.

Parameters:
e A System.EventArgs.

Definition at line 393 of file RadioButtonList.cs.

override void Anthem.RadioButtonList.RenderControl ( HtmlTextWriter  writer  ) 

Forces the server control to output content and trace information.

Definition at line 403 of file RadioButtonList.cs.


Property Documentation

[DefaultValue(false)] bool Anthem.RadioButtonList.AutoCallBack [get, set]

Gets or sets a value indicating whether the Checkbox state automatically calls back to the server when clicked. Mimics the AutoPostBack property.

Definition at line 26 of file RadioButtonList.cs.

Referenced by Anthem.RadioButtonList.OnPreRender(), and Anthem.RadioButtonList.RenderItem().

[Category("Default")][DefaultValue("")][MergableProperty(false)][PersistenceMode(PersistenceMode.InnerProperty)] override ASP.ListItemCollection Anthem.RadioButtonList.Items [get]

Override Items collection to force PersistenceMode.InnerProperty. This will cause the control to wrap the ListItems inside of an <Items> tag which the Visual Studio designer will validate. If you don't do this, the designer will complain that the "Element 'ListItem' is not a known element.".

Definition at line 48 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue("")][Description("The javascript function to call on the client if the callback is cancelled.")] virtual string Anthem.RadioButtonList.CallBackCancelledFunction [get, set]

Gets or sets the javascript function to execute on the client if the callback is cancelled. See PreCallBackFunction.

Implements Anthem.ICallBackControl.

Definition at line 164 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue(true)][Description("True if this control uses callbacks instead of postbacks to post data to the server.")] virtual bool Anthem.RadioButtonList.EnableCallBack [get, set]

Gets or sets a value indicating whether the control uses callbacks instead of postbacks to post data to the server.

true if the the control uses callbacks; otherwise, false. The default is true.

Implements Anthem.ICallBackControl.

Definition at line 190 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue(true)][Description("True if this control is enabled on the client during callbacks.")] virtual bool Anthem.RadioButtonList.EnabledDuringCallBack [get, set]

Gets or sets a value indicating whether the control is enabled on the client during callbacks.

true if the the control is enabled; otherwise, false. The default is true.

Not all HTML elements support this property.

Implements Anthem.ICallBackControl.

Definition at line 217 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue("")][Description("The javascript function to call on the client after the callback response is received.")] virtual string Anthem.RadioButtonList.PostCallBackFunction [get, set]

Gets or sets the javascript function to execute on the client after the callback response is received.

The callback response is passed into the PostCallBackFunction as the one and only parameter.

            function AfterCallBack(result) {
              if (result.error != null &amp;&amp; result.error.length &gt; 0) {
                alert(result.error);
              }
            }

Implements Anthem.ICallBackControl.

Definition at line 254 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue("")][Description("The javascript function to call on the client before the callback is made.")] virtual string Anthem.RadioButtonList.PreCallBackFunction [get, set]

Gets or sets the javascript function to execute on the client before the callback is made.

The function should return false on the client to cancel the callback.

Implements Anthem.ICallBackControl.

Definition at line 279 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue("")][Description("The text to display during the callback.")] virtual string Anthem.RadioButtonList.TextDuringCallBack [get, set]

Gets or sets the text to display on the client during the callback.

If the HTML element that invoked the callback has a text value (such as <input type="button" value="Run">) then the text of the element is updated during the callback, otherwise the associated <label> text is updated during the callback. If the element does not have a text value, and if there is no associated <label>, then this property is ignored.

Implements Anthem.ICallBackControl.

Definition at line 307 of file RadioButtonList.cs.

[Category("Anthem")][DefaultValue(false)][Description("True if this control should be updated after each callback.")] virtual bool Anthem.RadioButtonList.AutoUpdateAfterCallBack [get, set]

Gets or sets a value indicating whether the control should be updated after each callback. Also see UpdateAfterCallBack.

true if the the control should be updated; otherwise, false. The default is false.

            &lt;anthem:Label id="label" runat="server" AutoUpdateAfterCallBack="true" /&gt;

Implements Anthem.IUpdatableControl.

Definition at line 344 of file RadioButtonList.cs.

[Browsable(false)][DefaultValue(false)] virtual bool Anthem.RadioButtonList.UpdateAfterCallBack [get, set]

Gets or sets a value which indicates whether the control should be updated after the current callback. Also see AutoUpdateAfterCallBack.

true if the the control should be updated; otherwise, false. The default is false.

            this.Label = "Count = " + count;
            this.Label.UpdateAfterCallBack = true;

Implements Anthem.IUpdatableControl.

Definition at line 379 of file RadioButtonList.cs.

override bool Anthem.RadioButtonList.Visible [get, set]

Overrides the Visible property so that Anthem.Manager can track the visibility.

true if the control is rendered on the client; otherwise false. The default is true.

Definition at line 418 of file RadioButtonList.cs.

Referenced by Anthem.RadioButtonList.Render().


The documentation for this class was generated from the following file:
Generated on Wed Mar 14 23:50:41 2007 for Anthem by  doxygen 1.5.1-p1