From 89d8173ade1422aa99fb4f174a2c2ff014d1d3c3 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 5 Feb 2006 04:06:14 +0000 Subject: Added toggle column visibility demo. --- .../pages/Controls/Samples/TDataGrid/Sample2.page | 15 ++++++++++++++- .../pages/Controls/Samples/TDataGrid/Sample2.php | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'demos/quickstart/protected/pages/Controls/Samples') 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 @@ + + + + + + + + + + + + \ 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 -- cgit v1.2.3