TActiveRepeater Sample 3
The following example allows users to modify the existing tabular data using a TActiveRepeater. Two validators are used in the repeater to ensure the validity of user inputs. One is to ensure product names are not empty, the other ensures product prices are valid numeric format. After clicking on the save button, the input data is displayed in a table at the bottom of the page.
Name |
Category |
Price |
Imported |
Data['name']%>
AutoPostBack="true"
OnTextChanged="Page.saveInput"
OnCallback="Page.renderRepeater2"/>
|
|
Data['price']%>
AutoPostBack="true"
OnTextChanged="Page.saveInput"
OnCallback="Page.renderRepeater2"/>
|
Data['imported']%>
AutoPostBack="true"
OnCheckedChanged="Page.saveInput"
OnCallback="Page.renderRepeater2"/>
|
ID |
Name |
Category |
Price |
Imported |
<%#$this->Data['id']%> |
<%#$this->Data['name']%> |
<%#$this->Data['category']%> |
<%#$this->Data['price']%> |
<%#$this->Data['imported']?'Yes':'No'%> |
Computer Parts Inventory |
$Id: Sample3.page 1688 2007-02-09 22:48:31Z xue $