diff options
Diffstat (limited to 'demos/quickstart')
4 files changed, 130 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButton.page b/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButton.page new file mode 100644 index 00000000..ac6cf5ae --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveRadioButton.page @@ -0,0 +1,20 @@ +<com:TContent ID="body" >
+
+<h1>TRadioButton</h1>
+<com:DocLink ClassPath="System.Web.UI.ActiveControls.TActiveRadioButton" />
+
+<p class="block-content">
+<tt>TActiveRadioButton</tt> is the active control counter part to <tt>TRadioButton</tt>.
+The <tt>AutoPostBack</tt> property is set to true by default. Thus, when the radio button is clicked a
+<tt>OnCallback</tt> event is raise after <tt>OnCheckedChanged</tt> event.
+</p>
+
+<p class="block-content">
+The <tt>Text</tt> and <tt>Checked</tt> properties can be changed during a callback.
+The <tt>GroupName</tt> property may <b>NOT</b> be changed during callback because the client-side
+<tt>name</tt> attribute is read-only and can not be changed using javascript.
+</p>
+
+<com:RunBar PagePath="ActiveControls.Samples.TActiveRadioButton.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page index d5fe1360..6f403a42 100644 --- a/demos/quickstart/protected/pages/ActiveControls/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Home.page @@ -84,7 +84,7 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria </li>
<li>
- * <a href="?page=ActiveControls.ActiveRadioButton">TActiveRadioButton</a>
+ <a href="?page=ActiveControls.ActiveRadioButton">TActiveRadioButton</a>
represents a radiobutton on a Web page.
It is mainly used in a group from which users make a choice. It can
be used to perform a callback request.
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.page new file mode 100644 index 00000000..13b7853c --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.page @@ -0,0 +1,82 @@ +<com:TContent ID="body">
+
+<h1>TActiveRadioButton Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+A callback radiobutton:
+</td><td class="sampleaction">
+<com:TActiveRadioButton
+ Text="click me"
+ OnCheckedChanged="radiobuttonClicked"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A radiobutton causing validation on a textbox:
+</td><td class="sampleaction">
+<com:TActiveTextBox ID="TextBox" />
+<com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ Display="Dynamic"
+ ErrorMessage="input required in the textbox"
+ ValidationGroup="Group"
+ />
+<com:TActiveRadioButton
+ Text="submit"
+ AutoPostBack="true"
+ ValidationGroup="Group"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A radiobutton validated by a required field validator:
+</td><td class="sampleaction">
+<com:TActiveRadioButton
+ ID="RadioButton"
+ Text="Consent"
+ ValidationGroup="Group2"
+ />
+<com:TActiveButton Text="Submit" ValidationGroup="Group2" />
+<com:TRequiredFieldValidator
+ ControlToValidate="RadioButton"
+ Display="Dynamic"
+ ErrorMessage="You must consent."
+ ValidationGroup="Group2"
+ />
+</td></tr>
+
+<tr><td class="samplenote">
+A radiobutton group:
+</td><td class="sampleaction">
+<com:TActiveRadioButton
+ ID="Radio1"
+ GroupName="RadioGroup"
+ Text="Option 1"
+ OnCallback="selectRadioButton"
+ />
+<com:TActiveRadioButton
+ ID="Radio2"
+ GroupName="RadioGroup"
+ Text="Option 2"
+ OnCallback="selectRadioButton"
+ />
+<com:TActiveRadioButton
+ ID="Radio3"
+ GroupName="RadioGroup"
+ Text="Option 3"
+ OnCallback="selectRadioButton"
+ />
+<com:TActiveRadioButton
+ ID="Radio4"
+ Text="Option 4 (in a different group)"
+ OnCallback="selectRadioButton"
+ />
+<br/>
+<com:TActiveLabel ID="Result" />
+</td></tr>
+
+</table>
+
+<div class="last-modified">$Id$</div></com:TContent>
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.php new file mode 100644 index 00000000..034d2fcc --- /dev/null +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.php @@ -0,0 +1,27 @@ +<?php
+
+class Home extends TPage
+{
+ public function radiobuttonClicked($sender,$param)
+ {
+ $sender->Text="I'm clicked";
+ }
+
+ public function selectRadioButton($sender,$param)
+ {
+ $selection='';
+ if($this->Radio1->Checked)
+ $selection.='1';
+ if($this->Radio2->Checked)
+ $selection.='2';
+ if($this->Radio3->Checked)
+ $selection.='3';
+ if($this->Radio4->Checked)
+ $selection.='4';
+ if($selection==='')
+ $selection='empty';
+ $this->Result->Text='Your selection is '.$selection;
+ }
+}
+
+?>
\ No newline at end of file |