DHTMLX Docs & Samples Explorer

Link Button

Here is an example of implementation of html links in dhtmlxgrid. You can specify url or skip it. Also you can specify a target (_blank by default)

All links except "Yanka Kupala" will be opened in new windows.
"Yanka Kupala" will be opened in iframe


The corresponding cell value in XML should be a "^" delimited list of following values:

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxgrid.js"></script>        
<script  src="../../codebase/dhtmlxgridcell.js"></script>    
<script  src="../../codebase/excells/dhtmlxgrid_excell_link.js"></script>
 
 
 
<table width="700">
    <tr>
        <td width="350">
            <div id="gridbox" style="width:319px;height:250px;background-color:white;"></div>
        </td>
        <td valign="top">
            <iframe name="iframe_a" style="width:330px;height:150px"></iframe><br>
        </td>
    </tr>
</table>
    
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../codebase/imgs/");
mygrid.setHeader("Author,Title");
mygrid.setInitWidths("150,150");
mygrid.setColAlign("left,left");
mygrid.setColTypes("ro,link");
mygrid.setColSorting("str,str");
mygrid.setSkin("dhx_skyblue");
mygrid.init();
mygrid.loadXML("../common/grid_links.xml");
</script>