summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
authorxue <>2006-02-05 04:06:14 +0000
committerxue <>2006-02-05 04:06:14 +0000
commit89d8173ade1422aa99fb4f174a2c2ff014d1d3c3 (patch)
tree925966d0b1158044a621e5698c15d0b95c499ab9 /demos/quickstart/protected/pages/Controls/Samples
parent08bf73e5621cdc384db7c416e6e8b689123bb3a8 (diff)
Added toggle column visibility demo.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page15
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php6
2 files changed, 20 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
index c94f581d..6de3063a 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page
@@ -8,7 +8,6 @@
CellPadding="2"
ID="DataGrid"
AutoGenerateColumns="false"
- EnableViewState="false"
HeaderStyle.BackColor="black"
HeaderStyle.ForeColor="white"
ItemStyle.BackColor="#BFCFFF"
@@ -48,4 +47,18 @@
</com:TTemplateColumn>
</com:TDataGrid>
+<com:TPanel GroupingText="Column Visibility" Width="200px">
+
+<com:TCheckBoxList
+ AutoPostBack="true"
+ OnSelectedIndexChanged="toggleColumnVisibility">
+ <com:TListItem Text="Book Title" Selected="true" />
+ <com:TListItem Text="Publisher" Selected="true" />
+ <com:TListItem Text="Price" Selected="true" />
+ <com:TListItem Text="In-stock" Selected="true" />
+ <com:TListItem Text="Rating" Selected="true" />
+</com:TCheckBoxList>
+
+</com:TPanel>
+
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
index 16a32c28..03795910 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.php
@@ -73,6 +73,12 @@ class Sample2 extends TPage
$this->DataGrid->dataBind();
}
}
+
+ public function toggleColumnVisibility($sender,$param)
+ {
+ foreach($this->DataGrid->Columns as $index=>$column)
+ $column->Visible=$sender->Items[$index]->Selected;
+ }
}
?> \ No newline at end of file