HOW TO implement DataGrid with Smarty easily?

Talk and info about common issues

Moderators: ne_moj, zewa, vadimako, ne_moj, zewa, vadimako

fcsabihu
Junior
Junior
Posts: 14
Joined: Oct 14th, '09, 08:54

HOW TO implement DataGrid with Smarty easily?

Postby fcsabihu » Feb 18th, '12, 10:05

Hey friends using the Smarty template engine,

Here's a quick solution to implement your Datagrid tables into your Smarty templates:

1. Start your datagrid code with

Code: Select all

ob_start();


2. End your datagrid code with

Code: Select all

$dgrid->Bind();
$smarty->assign('myDatagridTable', ob_get_contents());
ob_end_clean();


3. Insert your table into your Smarty template

Code: Select all

{$myDatagridTable}


That's all. Good luck.

Return to “ApPHP DataGrid {HOW TO}”