Menu

Home

q-code

Welcome

This document describes the "cTable dynamic" class. It is a package of 5 classes described here after.
The last stable version is 1.3 (march 2012)


Abstract

The cTable class allows creating a table object template and manipulating it before rendering the rows. If you want to re-use several times the same table/row/column style or if you want to easily create columns (from a database request result), this class will help you.
Note that this class is design to build "data" table (i.e. to show dataset row in column). It provides support to make sortable column headers, to fill data in columns, or to formatted cell based on cell value.
If you plan to create html "layout" using table, this class will probably not be helpful.

Principle

The cTable class allows designing table, row, and column (table-header or table-data column). With basic methods, you can create attributes like 'class', 'id', 'style' and fill the cell content.
The rendering of the table is made on a "row-by-row" principle. This makes easy to integrate the methods in your code. Indeed, as you loop into your dataset, you can populate the cell contents, but also change the row or cell attributes, before displaying the row.

Key features

  • Create row and column "template" with attributes ('id', 'class', 'style' ...)
  • Create columns and populate column contents in one statement (e.g. from a query result row)
  • Add/Change attributes while looping into the dataset
  • Manage header-links to have clickable column headers to change sorting order
  • Define specific style ('class' or 'style' attributes) depending on specific data values

Resources

Page created by

Project Admins:


MongoDB Logo MongoDB