summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page5
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php8
-rw-r--r--tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php30
-rw-r--r--tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php50
5 files changed, 95 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index dcde542b..392e37c7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -788,6 +788,8 @@ tests/FunctionalTests/quickstart/Controls/CheckBoxTestCase.php -text
tests/FunctionalTests/quickstart/Controls/DataGrid1TestCase.php -text
tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php -text
tests/FunctionalTests/quickstart/Controls/DataGrid3TestCase.php -text
+tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php -text
+tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php -text
tests/FunctionalTests/quickstart/Controls/DataList1TestCase.php -text
tests/FunctionalTests/quickstart/Controls/DataList2TestCase.php -text
tests/FunctionalTests/quickstart/Controls/DropDownListTestCase.php -text
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page
index 8fc393e7..e4f2f052 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.page
@@ -50,6 +50,11 @@ Page Button Count:
<com:TButton Text="Submit" OnClick="useNumericPager" />
</com:TPanel>
+<com:TPanel GroupingText="Page Size" Width="300px">
+<com:TTextBox ID="PageSize" Text="5" /><br/>
+<com:TButton Text="Submit" OnClick="changePageSize" />
+</com:TPanel>
+
</com:TPanel>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php
index 30b78765..660c40af 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample5.php
@@ -60,6 +60,14 @@ class Sample5 extends Sample1
$this->DataGrid->DataSource=$this->Data;
$this->DataGrid->dataBind();
}
+
+ public function changePageSize($sender,$param)
+ {
+ $this->DataGrid->PageSize=TPropertyValue::ensureInteger($this->PageSize->Text);
+ $this->DataGrid->CurrentPageIndex=0;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
}
?> \ No newline at end of file
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
new file mode 100644
index 00000000..36810a8d
--- /dev/null
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
@@ -0,0 +1,30 @@
+<?php
+
+class DataGrid4TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true", "");
+
+ // verify the 2nd row of data
+ $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
+ $this->verifyTextPresent("Addison-Wesley Professional", "");
+ $this->verifyTextPresent("$47.04", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl6@checked','regexp:true|checked');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl6@disabled','regexp:true|disabled');
+
+ // verify sorting
+ $this->clickAndWait("link=Book Title", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl6@checked','regexp:false|null');
+ $this->clickAndWait("link=Publisher", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl6@checked','regexp:false|null');
+ $this->clickAndWait("link=Price", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl6@checked','regexp:false|null');
+ $this->clickAndWait("link=In-stock", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl6@checked','regexp:false|null');
+ $this->clickAndWait("link=Rating", "");
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl4_ctl6@checked','regexp:false|null');
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php
new file mode 100644
index 00000000..ad6cd8ca
--- /dev/null
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php
@@ -0,0 +1,50 @@
+<?php
+
+class DataGrid6TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&amp;notheme=true", "");
+
+ // verify column headers
+ $this->verifyTextPresent('id','');
+ $this->verifyTextPresent('name','');
+ $this->verifyTextPresent('quantity','');
+ $this->verifyTextPresent('price','');
+ $this->verifyTextPresent('imported','');
+
+ $this->verifyTextPresent('ITN001','');
+ $this->verifyTextPresent('ITN002','');
+ $this->verifyTextPresent('ITN003','');
+ $this->verifyTextPresent('ITN004','');
+ $this->verifyTextPresent('ITN005','');
+ $this->verifyTextNotPresent('ITN006','');
+
+ // verify paging
+ $this->clickAndWait("link=2", "");
+ $this->verifyTextPresent('ITN006','');
+ $this->verifyTextPresent('ITN007','');
+ $this->verifyTextPresent('ITN008','');
+ $this->verifyTextPresent('ITN009','');
+ $this->verifyTextPresent('ITN010','');
+ $this->verifyTextNotPresent('ITN011','');
+ $this->verifyTextNotPresent('ITN005','');
+
+ $this->clickAndWait("link=4", "");
+ $this->verifyTextPresent('ITN016','');
+ $this->verifyTextPresent('ITN017','');
+ $this->verifyTextPresent('ITN018','');
+ $this->verifyTextPresent('ITN019','');
+ $this->verifyTextNotPresent('ITN015','');
+
+ $this->clickAndWait("link=1", "");
+ $this->verifyTextPresent('ITN001','');
+ $this->verifyTextPresent('ITN002','');
+ $this->verifyTextPresent('ITN003','');
+ $this->verifyTextPresent('ITN004','');
+ $this->verifyTextPresent('ITN005','');
+ $this->verifyTextNotPresent('ITN006','');
+ }
+}
+
+?> \ No newline at end of file