<?php
require 'Structures/DataGrid.php';
require 'Structures/DataGrid/DataSource.php';
$dg =& new Structures_DataGrid();
// Get my data
$result = $db->query('SELECT * FROM users');
// Bind to DataGrid
$data = Structures_DataGrid_DataSource::create($result);
$dg->bindDataSource($data);
// Print the DataGrid
$dg->render();
?>