[ 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/TDataList/ -> Sample2.page (source)

   1  <com:TContent ID="body">
   2  
   3  <h1>TDataList Sample 2</h1>
   4  
   5  <com:TDataList
   6       ID="DataList"
   7       DataKeyField="id"
   8       OnEditCommand="editItem"
   9       OnCancelCommand="cancelItem"
  10       OnUpdateCommand="updateItem"
  11       OnDeleteCommand="deleteItem"
  12       OnSelectedIndexChanged="selectItem"
  13       HeaderStyle.BackColor="black"
  14       HeaderStyle.ForeColor="white"
  15       ItemStyle.BackColor="#BFCFFF"
  16       AlternatingItemStyle.BackColor="#E6ECFF"
  17       EditItemStyle.BackColor="lightgreen"
  18       SelectedItemStyle.BackColor="lightyellow">
  19  
  20  <prop:HeaderTemplate>
  21  <div style="font-weight:bold; text-align:center;">Computer Parts</div>
  22  </prop:HeaderTemplate>
  23  
  24  <prop:ItemTemplate>
  25  <table border="0" width="100%">
  26  <tr>
  27    <td>
  28    <com:TLinkButton
  29         Text=<%#$this->DataItem['id']%>
  30         CommandName="select"
  31         />
  32    <%#$this->DataItem['name']%>
  33    </td>
  34    <td align="right">
  35    <com:TLinkButton
  36         Text="Edit"
  37         CommandName="edit"
  38         />
  39    <com:TLinkButton
  40         Text="Delete"
  41         CommandName="delete"
  42         Attributes.onclick="if(!confirm('Are you sure?')) return false;"
  43         />
  44    </td>
  45  </tr>
  46  </table>
  47  </prop:ItemTemplate>
  48  
  49  <prop:SelectedItemTemplate>
  50  <table border="1" width="100%">
  51  <tr>
  52    <th>ID</th><th>Name</th><th>Quantity</th><th>Price</th>
  53  </tr>
  54  <tr>
  55    <td align="right"><%#$this->DataItem['id'] %></td>
  56    <td align="right"><%#$this->DataItem['name'] %></td>
  57    <td align="right"><%#$this->DataItem['quantity'] %></td>
  58    <td align="right">$<%#$this->DataItem['price'] %></td>
  59  </tr>
  60  <tr>
  61    <td colspan="4" align="right">
  62    <com:TLinkButton
  63         Text="Edit"
  64         CommandName="edit"
  65         />
  66    <com:TLinkButton
  67         Text="Delete"
  68         CommandName="delete"
  69         Attributes.onclick="if(!confirm('Are you sure?')) return false;"
  70         />
  71    </td>
  72  </tr>
  73  </table>
  74  </prop:SelectedItemTemplate>
  75  
  76  <prop:EditItemTemplate>
  77  <table border="0" width="100%">
  78  <tr>
  79    <td align="right">ID</td>
  80    <td><b><%#$this->DataItem['id']%></b></td>
  81  </tr>
  82  <tr>
  83    <td align="right">Name</td>
  84    <td><com:TTextBox
  85             ID="ProductName"
  86             Text=<%#$this->DataItem['name'] %>
  87             />
  88    </td>
  89  </tr>
  90  <tr>
  91    <td align="right">Quantity</td>
  92    <td><com:TTextBox
  93             ID="ProductQuantity"
  94             Text=<%#$this->DataItem['quantity'] %>
  95             />
  96    </td>
  97  </tr>
  98  <tr>
  99    <td align="right">Price</td>
 100    <td><com:TTextBox
 101             ID="ProductPrice"
 102             Text=<%#$this->DataItem['price'] %>
 103             />
 104    </td>
 105  </tr>
 106  <tr>
 107    <td align="right">Imported</td>
 108    <td><com:TCheckBox
 109             ID="ProductImported"
 110             Checked=<%#$this->DataItem['imported'] %>
 111             />
 112    </td>
 113  </tr>
 114  <tr>
 115    <td colspan="2" align="right">
 116      <com:TLinkButton Text="Save" CommandName="update" />
 117      <com:TLinkButton Text="Cancel" CommandName="cancel" />
 118    </td>
 119  </tr>
 120  </table>
 121  </prop:EditItemTemplate>
 122  
 123  </com:TDataList>
 124  
 125  </com:TContent>


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