summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page6
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php9
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample6.page3
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