diff options
author | xue <> | 2006-03-19 16:24:35 +0000 |
---|---|---|
committer | xue <> | 2006-03-19 16:24:35 +0000 |
commit | a31c95cfdb23a9dd068759249389c4a9c0734511 (patch) | |
tree | ea12c62dd48e389b05a257552f1b1d03fa29cca1 /demos/quickstart/protected/pages/Controls | |
parent | 64310ee432c1eb9e50559581a7570aba534c7e20 (diff) |
Update datagrid samples in respect to the new change to TDataGrid.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls')
3 files changed, 8 insertions, 10 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page index e4f2f052..87a34b04 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page @@ -3,13 +3,14 @@ <h1>TDataGrid Sample 5</h1>
<h2>Paging</h2>
+<div style="width:500px">
<com:TDataGrid
ID="DataGrid"
AllowPaging="true"
PageSize="5"
PagerStyle.Mode="Numeric"
PagerStyle.HorizontalAlign="Right"
- Width="500px"
+ Width="100%"
CellPadding="2"
HeaderStyle.BackColor="black"
HeaderStyle.ForeColor="white"
@@ -17,8 +18,9 @@ ItemStyle.Font.Italic="true"
AlternatingItemStyle.BackColor="#E6ECFF"
OnPageIndexChanged="changePage"
- OnItemCreated="itemCreated"
+ OnPagerCreated="pagerCreated"
/>
+</div>
<com:TPanel GroupingText="Pager Visibility" Width="300px">
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php index 660c40af..bdca2ca8 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php @@ -11,14 +11,9 @@ class Sample5 extends Sample1 $this->DataGrid->dataBind();
}
- public function itemCreated($sender,$param)
+ public function pagerCreated($sender,$param)
{
- $item=$param->Item;
- if($item->ItemType==='Pager')
- {
- // prepend 'Page: ' to the pager
- $item->Cells[0]->Controls->insertAt(0,'Page: ');
- }
+ $param->Pager->Controls->insertAt(0,'Page: ');
}
public function changePagerPosition($sender,$param)
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page index c8a8c9a2..d2277bc5 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page @@ -3,6 +3,7 @@ <h1>TDataGrid Sample 6</h1>
<h2>Custom Paging</h2>
+<div style="width:500px">
<com:TDataGrid
ID="DataGrid"
AllowPaging="true"
@@ -11,7 +12,6 @@ PageSize="5"
PagerStyle.Mode="Numeric"
PagerStyle.HorizontalAlign="Right"
- Width="500px"
CellPadding="2"
HeaderStyle.BackColor="black"
HeaderStyle.ForeColor="white"
@@ -20,5 +20,6 @@ AlternatingItemStyle.BackColor="#E6ECFF"
OnPageIndexChanged="changePage"
/>
+</div>
</com:TContent>
\ No newline at end of file |