WebSite-PHP Framework PHP
Multi language
Simple Ajax mode
No HTML, no JavaScript
URL rewriting
Mail sending
Sitemap - RSS - Web service
Download WebSite-PHP FrameWork now
 


Loading
 


Tutorial Table

Tutorials

>

Tutorial Table



Tutorial 1 : Simple Table
File: /pages/tutorials/table/table-01.php

<?php
class Table01 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Simple Table";
        
        
$this->render = new Table();
        
$this->render->setBorder(1);
        
$this->render->addRowColumns("row1 col1""row1 col2");
        
$this->render->addRowColumns("row2 col1""row2 col2");
        
$this->render->addRowColumns("row2 col1""row3 col2");
    }
}
?>


Tutorial 2 : Complex Table
File: /pages/tutorials/table/table-02.php

<?php
class Table02 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Complex Table";
        
        
$this->render = new Table();
        
$this->render->setBorder(1);
        
        
$row1 $this->render->addRowColumns("1-1+2""1-3""1-4");
        
$row1->setColumnColspan(12);
        
        
$this->render->addRowColumns("2-1""2-2""2-3""2-4");
        
        
$row3 $this->render->addRowColumns("3-1""3-2"
                                            
"3-3""3-4");
        
$row3->setColumnRowspan(32);
        
        
$this->render->addRowColumns("4-1""4-2""4-4");
    }
}
?>


Tutorial 3 : Complex Table with style
File: /pages/tutorials/table/table-03.php

<?php
class Table03 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Complex Table 
                                with style"
;
        
        
$this->render = new Table();
        
$this->render->setBorder(1)->setWidth("200px");
        
        
$row1 = new RowTable(RowTable::ALIGN_CENTER);
        
$row1->add("1-1+2")->add("1-3")->add("1-4");
        
$row1->setColumnColspan(12);
        
$this->render->addRow($row1);
        
        
$row2 = new RowTable(RowTable::ALIGN_CENTER"50px");
        
$row2->add("2-1")->add("2-2")->add("2-3")->add("2-4");
        
$this->render->addRow($row2);
        
        
$row3 $this->render->addRowColumns("3-1""3-2"
                                            
"3-3""3-4");
        
$row3->setColumnRowspan(32);
        
$row3->setColumnStyle(2"background-color: red;");
        
        
$this->render->addRowColumns("4-1""4-2""4-4");
    }
}
?>


Tutorial 4 : Advance Table
File: /pages/tutorials/table/table-04.php

<?php
class Table04 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Advance Table";
        
        
$this->render = new Table();
        
$this->render->setId("users_table_04");
        
$this->render->activateAdvanceTable();
        
$this->render->setWidth(400);
        
        
$header $this->render->addRowColumns("Name""Login""Email");
        
$header->setHeaderClass(0);
        
        
$this->render->addRowColumns("Toto""toto""toto@toto.com");
        
$this->render->addRowColumns("Tata""tata""tata@tata.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
    }
}
?>


Tutorial 5 : Advance Table with more properties
File: /pages/tutorials/table/table-05.php

<?php
class Table05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Advance Table 
                                with more properties"
;
        
        
$this->render = new Table();
        
$this->render->setId("users_table_05");
        
$this->render->activateAdvanceTable();
        
$this->render->setWidth(500);
        
        
$this->render->activateSort(1);
        
$this->render->activateSearch();
        
$this->render->activatePagination(10);
        
$this->render->activateAdvanceTableInfo();
        
        
$header $this->render->addRowColumns("Name"
                                            
"Login""Email");
        
$header->setHeaderClass(0);
        
        
$this->render->addRowColumns("Toto""toto""toto@toto.com");
        
$this->render->addRowColumns("Tata""tata""tata@tata.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
    }
}
?>


Tutorial 6 : Table with prededined style
File: /pages/tutorials/table/table-06.php

<?php
class Table06 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Table with 
                                prededined style"
;
        
        
$this->render = new Table();
        
$this->render->setWidth(400);
        
$this->render->setClass(Table::STYLE_MAIN);
        
        
$header $this->render->addRowColumns("Name""Login""Email");
        
$header->setHeaderClass(Table::STYLE_MAIN);
        
        
$this->render->addRowColumns("Toto""toto""toto@toto.com");
        
$this->render->addRowColumns("Tata""tata""tata@tata.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
    }
}
?>


Tutorial 7 : Advance Table with column filter
File: /pages/tutorials/table/table-07.php

<?php
class Table07 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Advance Table 
                                with column filter"
;
        
        
$this->render = new Table();
        
$this->render->setId("users_table_07");
        
$this->render->setDefaultAlign(RowTable::ALIGN_CENTER);
        
        
$column_filter_params "{ type: 'text' },
        { type: 'select', bRegex:true, 
                values: [ 
                    {value: '^Man', label: 'Man'},
                    'Woman'
                ] },
        { type: 'number-range' }"
;
        
$this->render->activateColumnsFilter(
            
$column_filter_paramsTable::COL_FILTER_POSITION_TOP);
        
        
$header $this->render->addRowColumns("Name"
                                            
"Sex""Age");
        
$header->setHeaderClass(0);
        
$header->setColumnWidth(3160);
        
        
$this->render->addRowColumns("Toto""Man"23);
        
$this->render->addRowColumns("Tata""Woman"45);
        
$this->render->addRowColumns("Titi""Man"32);
    }
}
?>


Tutorial 8 : Table with fixe header
File: /pages/tutorials/table/table-08.php

<?php
class Table08 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Table with 
                                fixe header"
;
        
        
$this->render = new Table();
        
$this->render->setId("users_table_08");
        
$this->render->activateFixeHeader();
        
        
$header $this->render->addRowColumns("Name"
                                            
"Login""Email");
        
$header->setHeaderClass(0);
        
        
$this->render->addRowColumns("Toto""toto""toto@toto.com");
        
$this->render->addRowColumns("Tata""tata""tata@tata.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
    }
}
?>


Tutorial 9 : Scrollable Table
File: /pages/tutorials/table/table-09.php

<?php
class Table09 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Scrollable Table";
        
        
$this->render = new Table();
        
$this->render->setId("users_table_09");
        
$this->render->activateVerticalScroll();
        
$this->render->activateHorizontalScroll();
        
        
$header $this->render->addRowColumns("Name"
                                            
"Login""Email");
        
$header->setHeaderClass(0);
        
        
$this->render->addRowColumns("Toto""toto""toto@toto.com");
        
$this->render->addRowColumns("Tata""tata""tata@tata.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Titi""titi""titi@titi.com");
        
$this->render->addRowColumns("Aaaa""aaaa""aaaa@aaaa.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
        
$this->render->addRowColumns("Zzzz""zzzz""zzzz@zzzz.com");
    }
}
?>



Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Home Documentation Download Quick start Tutorials Wiki Issue Tracker