summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-01 22:14:00 +0000
committerctrlaltca@gmail.com <>2011-06-01 22:14:00 +0000
commit67666aaccb4b4743a084b214722e1173e827e9d1 (patch)
treee0b6204f917845f382c33bcbe5c2a6822e856020 /demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton
parent6521eecc250d756a9bb1a8b2f9a2c6a579accadd (diff)
upported recent documentation changes from branch/3.1 to trunk/
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton')
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.page82
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Samples/TActiveRadioButton/Home.php27
2 files changed, 109 insertions, 0 deletions
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