Grids Renderer Tooltip Example
Estimated reading: 1 minute
In this example we want to configure the custom rendering of the Title column in a grid of the Service module to display the description of the ticket, when the mouse passes over.
The code you have to insert PHP codethat return a string containing the HTML code that has to be rendered in the grid cell.
We will then use PHP to access the operation fields and to properly build the string containing the HTML code.
To enter the custom renderer configuration code click on the </> icon in the Renderer field to display the scripting area.
//print the ticket title
$html = '' . $value . '';
//define tooltip content ticket Description
$html .= ''.$row->getDescription().'';
//initialise tooltip js component
$initToolTip = Deep::registry('deep_grid_title_tooltip');
if(!$initToolTip){
Deep::register('deep_grid_title_tooltip', true);
$html .= '';
}
return $html;