From c1937cccd0985e86e247287faa9ac60870feecd7 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 27 Aug 2006 23:26:55 +0000 Subject: Merge from 3.0 branch till 1350. --- .../Controls/Samples/TClientSideValidator/Home.page | 18 +++++++++--------- .../pages/Controls/Samples/TDataGrid/Sample3.page | 7 ++++++- .../pages/Controls/Samples/TDataGrid/Sample3.php | 16 ++++++++-------- .../protected/pages/Controls/Validation.page | 9 +++++---- 4 files changed, 28 insertions(+), 22 deletions(-) (limited to 'demos/quickstart/protected') diff --git a/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page index e96e7c12..2bfb1a28 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page @@ -4,16 +4,16 @@
- -
+ - + - + Event.OnLoad(function() { diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page index 2864de46..96affa4a 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page @@ -23,16 +23,19 @@ > - + @@ -70,6 +74,7 @@ ItemStyle.Font.Italic="false" /> ItemType==='EditItem') { // set column width of textboxes - $item->Cells[0]->Controls[0]->Columns=40; - $item->Cells[2]->Controls[0]->Columns=5; + $item->BookTitleColumn->TextBox->Columns=40; + $item->PriceColumn->TextBox->Columns=5; } if($item->ItemType==='Item' || $item->ItemType==='AlternatingItem' || $item->ItemType==='EditItem') { // add an aleart dialog to delete buttons - $item->Cells[6]->Controls[0]->Attributes->onclick='if(!confirm(\'Are you sure?\')) return false;'; + $item->DeleteColumn->Button->Attributes->onclick='if(!confirm(\'Are you sure?\')) return false;'; } } @@ -160,11 +160,11 @@ class Sample3 extends TPage $item=$param->Item; $this->updateBook( $this->DataGrid->DataKeys[$item->ItemIndex], // ISBN - $item->Cells[0]->Controls[0]->Text, // title - $item->Cells[1]->Controls[0]->Text, // publisher - $item->Cells[2]->Controls[0]->Text, // price - $item->Cells[3]->Controls[0]->Checked, // instock - $item->Cells[4]->Rating->SelectedValue // rating + $item->BookTitleColumn->TextBox->Text, // title + $item->PublisherColumn->TextBox->Text, // publisher + $item->PriceColumn->TextBox->Text, // price + $item->InStockColumn->CheckBox->Checked, // instock + $item->RatingColumn->Rating->SelectedValue // rating ); $this->DataGrid->EditItemIndex=-1; $this->DataGrid->DataSource=$this->Data; diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page index 2241f346..119749db 100644 --- a/demos/quickstart/protected/pages/Controls/Validation.page +++ b/demos/quickstart/protected/pages/Controls/Validation.page @@ -160,7 +160,7 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b
  • The OnError event is raised after the validator fails validation.
  • The corresponding events for the client side is available as sub-properties - of the ClientSide property of the validator. + of the ClientSide property of the validator.

    The following example pop-up a message saying "hello" when the validator fails on the client-side. @@ -172,18 +172,19 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b The resulting client-side event callback function is of the following form. -function onErrorHandler(validator, sender) +function onErrorHandler(sender, parameter) { alert("hello"); } -Where validator is the current client-side validator and sender +Where sender is the current client-side validator and parameter is the control that invoked the validator.

    Conditional Validation Example

    The following example show the use of client-side and server side validator events. The example -demonstrates conditional validation. +demonstrates conditional validation.

    + \ No newline at end of file -- cgit v1.2.3