Structures_DataGrid

Structures_DataGrid ist ein Package zur Erzeugung, Manipulation und Darstellung von Daten in Tabellen. Tabellen können in einer Vielzahl von Formaten erstellt werden, wie z.B. HTML, XML, XUL oder als Excel-Datei.

Die dargestellte Datenmenge kann eingegrenzt und sortiert werden. Die entsprechenden Funktionen orientieren sich am DataGrid-Control des .NET-Frameworks.

Einführung und Funktionen

Inhaltsverzeichnis
Introduction -- What can I do with Structures_DataGrid?
FAQ -- Answers to most Frequently Asked Questions
Installation -- How to install the core and drivers packages
DataSources -- What is a DataSource driver?
Rendering the output -- What formats can I render the output?
Streaming -- How to stream large recordsets
Column Formatter -- What can I do with the column formatter?
Example - Quick -- Quickly retrieve data from a database table
Example - Complex -- How to build a datagrid using many of the features
Custom DataSources --  How to write your own DataSource driver.
Custom Renderers --  How to write your own Rendering driver.

Die Klasse Structures_DataGrid

Inhaltsverzeichnis
constructor Structures_DataGrid::Structures_DataGrid() -- Constructor
Structures_DataGrid::addColumn() -- Add a column, with optional position
Structures_DataGrid::attachRenderer() -- Attach an already instantiated Rendering driver
Structures_DataGrid::bind() -- A simple way to add a record set to the datagrid
Structures_DataGrid::bindDataSource() -- Bind an already instantiated DataSource driver
Structures_DataGrid::build() -- Build the datagrid
Structures_DataGrid::dataSourceFactory() -- Datasource driver Factory
Structures_DataGrid::dump() --  Method used for debugging purposes only. Displays a dump of the DataGrid object.
Structures_DataGrid::enableStreaming() --  Enable streaming support for reading from DataSources and writing with Renderers and set the buffer size (number of records)
Structures_DataGrid::fill() -- Fill a rendering container with data
Structures_DataGrid::getColumnByField() -- Find a column by field name
Structures_DataGrid::getColumnByName() -- Find a column by name (label)
Structures_DataGrid::getColumnCount() -- Returns the number of columns
Structures_DataGrid::getCurrentPage() -- Retrieves the current page number when paging is implemented
Structures_DataGrid::getCurrentRecordNumberEnd() -- Returns the number of the last record of the current page
Structures_DataGrid::getCurrentRecordNumberStart() -- Returns the number of the first record of the current page
Structures_DataGrid::getDataSource() -- Get the currently loaded DataSource driver
Structures_DataGrid::getOutput() -- Return the datagrid output
Structures_DataGrid::getPageCount() -- Returns the total number of pages
Structures_DataGrid::getRecordCount() -- Returns the total number of records
Structures_DataGrid::getRenderer() -- Get the current or default Rendering driver
Structures_DataGrid::removeColumn() -- Remove a column
Structures_DataGrid::render() -- Render the datagrid
Structures_DataGrid::setCurrentPage() -- Define the current page number.
Structures_DataGrid::setDataSourceOption() -- Set a single datasource option
Structures_DataGrid::setDataSourceOptions() -- Set multiple datasource options
Structures_DataGrid::setDefaultSort() -- Set default sorting specification
Structures_DataGrid::setRenderer() -- Set Renderer
Structures_DataGrid::setRendererOption() -- Set a single renderer option
Structures_DataGrid::setRendererOptions() -- Set multiple renderer options
Structures_DataGrid::setRequestPrefix() -- Set the global GET/POST variables prefix
Structures_DataGrid::sortRecordSet() -- Sorts the records by the defined field.

Die Klasse Structures_DataGrid_Column

Inhaltsverzeichnis
Klassenübersicht Structures_DataGrid_Column -- Structures_DataGrid_Column-Klasse
constructor Structures_DataGrid_Column::Structures_DataGrid_Column() -- Constructor
Structures_DataGrid_Column::formatter() -- Formatter
Structures_DataGrid_Column::getAttributes() -- Get the column XML/HTML attributes
Structures_DataGrid_Column::getAutoFillValue() -- Get auto fill value
Structures_DataGrid_Column::getField() -- Get name of the field for the column to be mapped to
Structures_DataGrid_Column::getLabel() -- Get column label
Structures_DataGrid_Column::getOrderBy() -- Get the field name or the expression to order the data by
Structures_DataGrid_Column::setAttributes() -- Set the column XML/HTML attributes
Structures_DataGrid_Column::setAutoFillValue() -- Set auto fill value
Structures_DataGrid_Column::setField() -- Set name of the field for the column to be mapped to
Structures_DataGrid_Column::setFormatter() -- Set Formatter Callback
Structures_DataGrid_Column::setLabel() -- Set column label
Structures_DataGrid_Column::setOrderBy() -- Set the field name or the expression to order the data by

DataSource-Treiber

Inhaltsverzeichnis
Structures_DataGrid_DataSource_Array -- Array Data Source Driver
Structures_DataGrid_DataSource_CSV -- Comma Seperated Value (CSV) Data Source Driver
Structures_DataGrid_DataSource_DataObject -- PEAR::DB_DataObject Data Source Driver
Structures_DataGrid_DataSource_DB -- PEAR::DB Data Source Driver
Structures_DataGrid_DataSource_DBQuery -- PEAR::DB SQL Query Data Source Driver
Structures_DataGrid_DataSource_DBTable -- PEAR::DB_Table Data Source Driver
Structures_DataGrid_DataSource_Excel -- Excel Spreadsheet Data Source Driver
Structures_DataGrid_DataSource_MDB2 -- PEAR::MDB2 SQL Query Data Source Driver
Structures_DataGrid_DataSource_RSS -- RSS data source driver
Structures_DataGrid_DataSource_XML -- XML data source driver

Renderer-Treiber

Inhaltsverzeichnis
Structures_DataGrid_Renderer_Console -- Console Table Rendering Driver
Structures_DataGrid_Renderer_CSV -- CSV Rendering Driver
Structures_DataGrid_Renderer_HTMLSortForm -- Multiple fields sorting form rendering driver
Structures_DataGrid_Renderer_HTMLTable -- HTML Table Rendering Driver
Structures_DataGrid_Renderer_Pager -- Pager rendering driver
Structures_DataGrid_Renderer_Smarty -- Smarty Rendering Driver
Structures_DataGrid_Renderer_XLS -- Excel Spreadsheet Rendering Driver
Structures_DataGrid_Renderer_XML -- XML Rendering Driver
Structures_DataGrid_Renderer_XUL -- XUL Rendering Driver