Structures_DataGrid

Structures_DataGrid est une classe pour construire, manipuler et générer un rendu d'une structure de donnée tabulaire. (Éventuellement appelée grille dans la présente traduction) It has the ability to allow you to render a datagrid in HTML format as well as many other formats such as an XML Document, an Excel Spreadsheet, an XUL Document and more.

Elle offre aussi les fonctionalités de tri et de pagination pour limiter les données présentées. Ce concept est basé sur le framework .NET DataGrid control et travaille aussi bien avec des résultats XML qu'avec une base données.

Introduction et fonctionnalités

Table des matières
Introduction -- Que peut-on faire avec 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 -- Comment streamer de grands ensembles de données
Column Formatter -- What can I do with the column formatter?
Exemple - Simple -- Récupération rapide de données depuis une table de base de données
Exemple élaboré -- Comment construire une grille de données en utilisant plusieurs fonctionalités
Custom DataSources --  How to write your own DataSource driver.
Custom Renderers --  How to write your own Rendering driver.

Classe Structures_DataGrid

Table des matières
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::generateColumns() -- Generate columns from a fields list
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::getColumns() -- Return the current 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.

Classe Structures_DataGrid_Column

Table des matières
Résumé de la classe Structures_DataGrid_Column -- Structures_DataGrid_Column Class
Constructeur Structures_DataGrid_Column::Structures_DataGrid_Column() -- Constructeur
Structures_DataGrid_Column::format() -- Choose a format preset
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::getDefaultDirection() -- Return the default direction to order this column by
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::setDefaultDirection() -- Set the default direction to order this column by
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

Drivers de source de données

Table des matières
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

Drivers de rendu

Table des matières
Structures_DataGrid_Renderer_Console -- Console Table Rendering Driver
Structures_DataGrid_Renderer_CSV -- CSV Rendering Driver
Structures_DataGrid_Renderer_HTMLEditForm -- HTML form to edit a record
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