If you are not familiar with PEAR, we recommend that you first read the PEAR general installation instructions
Structures_DataGrid uses drivers that are provided separately. It means that installing the core package named Structures_DataGrid is not enough to get something working.
You will at least need one DataSource driver, for handling the input, and one Rendering driver (or Renderer), for the output.
The following commands will install the core package, as well as the MDB2 DataSource (for binding SQL queries), HTML_Table Renderer and the Pager renderer (for paging links). That should cover your most common needs.
$ pear install -o Structures_DataGrid $ pear install -o Structures_DataGrid_DataSource_MDB2 $ pear install -o Structures_DataGrid_Renderer_HTMLTable $ pear install -o Structures_DataGrid_Renderer_Pager
If you get an error message like Failed to download pear/Structures_DataGrid within preferred state "stable", latest release is [...], you can simply append
-beta
to the package name, for example:$ pear install -o Structures_DataGrid-beta
Of course, you may want to use other input/output formats, such as XML, MS Excel, DB_DataObject, XUL, etc... Just install the corresponding drivers.
It is possible to install all DataSource drivers or all Renderer drivers at once. The following two commands will install Structures_DataGrid and either all DataSource or all Renderer drivers at once.
$ pear install Structures_DataGrid-beta#datasources $ pear install Structures_DataGrid-beta#renderers
Please note that the individual drivers will be installed only if the requirements are fulfilled. That means that the MDB2 DataSource won't be installed if you don't have MDB2 installed. The same holds for the Excel Renderer if you don't have Spreadsheet_Excel_Writer installed.
Of course, the same holds for the uninstallation. For example:
$ pear uninstall Structures_DataGrid-beta#datasources $ pear uninstall Structures_DataGrid-beta#renderers