[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/demos/quickstart/protected/pages/Controls/Samples/TRadioButtonList/ -> Home.page (source)

   1  <com:TContent ID="body">
   2  
   3  <h1>TRadioButtonList Samples</h1>
   4  
   5  <table class="sampletable">
   6  
   7  <tr>
   8  <td class="samplenote">
   9  Radio button list with default settings:
  10  </td>
  11  <td class="sampleaction">
  12  <com:TRadioButtonList>
  13    <com:TListItem Value="value 1" Text="item 1" />
  14    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  15    <com:TListItem Value="value 3" Text="item 3" />
  16    <com:TListItem Value="value 4" Text="item 4" />
  17  </com:TRadioButtonList>
  18  </td>
  19  </tr>
  20  
  21  <tr>
  22  <td class="samplenote">
  23  Radio button list with customized cellpadding, cellspacing, color and text alignment:
  24  </td>
  25  <td class="sampleaction">
  26  <com:TRadioButtonList
  27      CellPadding="5"
  28      CellSpacing="1"
  29      BackColor="silver"
  30      TextAlign="Left">
  31    <com:TListItem Value="value 1" Text="item 1" />
  32    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  33    <com:TListItem Value="value 3" Text="item 3" />
  34    <com:TListItem Value="value 4" Text="item 4" />
  35  </com:TRadioButtonList>
  36  </td>
  37  </tr>
  38  
  39  <tr>
  40  <td class="samplenote">
  41  Radio button list with vertical (default) repeat direction:
  42  </td>
  43  <td class="sampleaction">
  44  <com:TRadioButtonList RepeatColumns="3">
  45    <com:TListItem Value="value 1" Text="item 1" />
  46    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  47    <com:TListItem Value="value 3" Text="item 3" />
  48    <com:TListItem Value="value 4" Text="item 4" />
  49  </com:TRadioButtonList>
  50  </td>
  51  </tr>
  52  
  53  <tr>
  54  <td class="samplenote">
  55  Radio button list with horizontal repeat direction:
  56  </td>
  57  <td class="sampleaction">
  58  <com:TRadioButtonList RepeatDirection="Horizontal"    RepeatColumns="3">
  59    <com:TListItem Value="value 1" Text="item 1" />
  60    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  61    <com:TListItem Value="value 3" Text="item 3" />
  62    <com:TListItem Value="value 4" Text="item 4" />
  63  </com:TRadioButtonList>
  64  </td>
  65  </tr>
  66  
  67  <tr>
  68  <td class="samplenote">
  69  Radio button list with flow layout and vertical (default) repeat direction:
  70  </td>
  71  <td class="sampleaction">
  72  <com:TRadioButtonList RepeatLayout="Flow" RepeatColumns="3">
  73    <com:TListItem Value="value 1" Text="item 1" />
  74    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  75    <com:TListItem Value="value 3" Text="item 3" />
  76    <com:TListItem Value="value 4" Text="item 4" />
  77  </com:TRadioButtonList>
  78  </td>
  79  </tr>
  80  
  81  <tr>
  82  <td class="samplenote">
  83  Radio button list with flow layout and horizontal repeat direction:
  84  </td>
  85  <td class="sampleaction">
  86  <com:TRadioButtonList
  87      RepeatLayout="Flow"
  88      RepeatDirection="Horizontal"
  89      RepeatColumns="3">
  90    <com:TListItem Value="value 1" Text="item 1" />
  91    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
  92    <com:TListItem Value="value 3" Text="item 3" />
  93    <com:TListItem Value="value 4" Text="item 4" />
  94  </com:TRadioButtonList>
  95  </td>
  96  </tr>
  97  
  98  <tr>
  99  <td class="samplenote">
 100  Radio button list's behavior upon postback:
 101  </td>
 102  <td class="sampleaction">
 103  <com:TRadioButtonList ID="RadioButtonList">
 104    <com:TListItem Value="value 1" Text="item 1" />
 105    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 106    <com:TListItem Value="value 3" Text="item 3" />
 107    <com:TListItem Value="value 4" Text="item 4" Enabled="false" />
 108    <com:TListItem Value="value 5" Text="item 5" />
 109  </com:TRadioButtonList>
 110  <com:TButton Text="Submit" OnClick="buttonClicked" />
 111  <br/>
 112  <com:TLabel ID="SelectionResult" ForeColor="red" />
 113  </td>
 114  </tr>
 115  
 116  <tr>
 117  <td class="samplenote">
 118  Auto postback radio button list:
 119  </td>
 120  <td class="sampleaction">
 121  <com:TRadioButtonList
 122      AutoPostBack="true"
 123      OnSelectedIndexChanged="selectionChanged">
 124    <com:TListItem Value="value 1" Text="item 1" />
 125    <com:TListItem Value="value 2" Text="item 2" Selected="true" />
 126    <com:TListItem Value="value 3" Text="item 3" />
 127    <com:TListItem Value="value 4" Text="item 4" Enabled="false" />
 128    <com:TListItem Value="value 5" Text="item 5" />
 129  </com:TRadioButtonList>
 130  <com:TLabel ID="SelectionResult2" ForeColor="red" />
 131  </td>
 132  </tr>
 133  
 134  </table>
 135  
 136  
 137  
 138  <h2>Radio Button Lists with DataBinding</h2>
 139  
 140  <table class="sampletable">
 141  
 142  <tr>
 143  <td class="samplenote">
 144  Databind to an integer-indexed array:
 145  </td>
 146  <td class="sampleaction">
 147  <com:TRadioButtonList ID="DBRadioButtonList1"
 148      AutoPostBack="true"
 149      OnSelectedIndexChanged="DBRadioButtonList1Changed" />
 150  <com:TLabel ID="DBRadioButtonList1Result" ForeColor="red" />
 151  </td>
 152  </tr>
 153  
 154  <tr>
 155  <td class="samplenote">
 156  Databind to an associative array:
 157  </td>
 158  <td class="sampleaction">
 159  <com:TRadioButtonList ID="DBRadioButtonList2"
 160      AutoPostBack="true"
 161      OnSelectedIndexChanged="DBRadioButtonList2Changed" />
 162  <com:TLabel ID="DBRadioButtonList2Result" ForeColor="red" />
 163  </td>
 164  </tr>
 165  
 166  <tr>
 167  <td class="samplenote">
 168  Databind with DataTextField and DataValueField specified:
 169  </td>
 170  <td class="sampleaction">
 171  <com:TRadioButtonList ID="DBRadioButtonList3"
 172      AutoPostBack="true"
 173      DataTextField="name"
 174      DataValueField="id"
 175      OnSelectedIndexChanged="DBRadioButtonList3Changed" />
 176  <com:TLabel ID="DBRadioButtonList3Result" ForeColor="red" />
 177  </td>
 178  </tr>
 179  
 180  </table>
 181  
 182  
 183  <h2>RadioButton List with Validation</h2>
 184  
 185  <table class="sampletable">
 186  
 187  <tr>
 188  <td class="samplenote">
 189  RadioButton list causing validation:
 190  </td>
 191  <td class="sampleaction">
 192  <com:TTextBox ID="TextBox" />
 193  <com:TRequiredFieldValidator
 194      ControlToValidate="TextBox"
 195      ErrorMessage="You must enter a value"
 196      Display="Dynamic"
 197      ValidationGroup="Group2"
 198      />
 199  <com:TRadioButtonList AutoPostBack="true" ValidationGroup="Group2">
 200    <com:TListItem Text="Agree" />
 201    <com:TListItem Text="Disagree" />
 202  </com:TRadioButtonList>
 203  </td>
 204  </tr>
 205  
 206  </table>
 207  
 208  </com:TContent>


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7