Categories | Question details Back To List | ||
HTML table to grid Hi, i was trying to convert a html table into a grid, is it possible to modify a cell height ??, i cannot show a cell within an image inside, i mean, the image appears but i'm not able to modify the cell dimension in order to get a right view of the image, the grid appears like a enableMultiline on false or somethign like that, here is my code: <?php echo '<table border="0" id="tab_list" name="tab_list" width="100%" lightnavigation="false" oninit="">'; echo '<tr> <td type="ro" align="center"> Modelo</td> <td type="ro" align="center"> Descripción</td> <td type="ron" align="center"> Precio Lista $</td> <td type="img" align="center"> Foto</td> </tr>'; do { /*FOTOS */ $foto=$row["matnr"]; $existe=file_exists('../images/productos/'.$foto.'.jpg'); if ($existe){ $fotfile='../images/productos/'.$foto.'.jpg'; $fotfilex=1; }else{ $fotfile='../images/productos/nohayphoto.gif'; $fotfilex=0; } /*FOTOS*/ echo "<tr><td>".$row["matnr"]."</td>"; echo "<td>".$row["maktx"]."</td>"; echo "<td>".$row["kbetr"]."</td>"; echo "<td>$fotfile</td></tr>"; } while ($row = mysql_fetch_array($lista)); echo ' </table>'; ?> <table border="0" width="100%"> <tr> <td> <div align="left" id="pagingArea"></div> </td> </tr> </table> <script> mytabs = new dhtmlXGridFromTable("tab_list"); mytabs.setImagePath("./../codebase/imgs/"); mytabs.setInitWidths("90,*,90,*"); mytabs.enableMultiline(true); mytabs.enablePaging(true,10,5,"pagingArea",true); mytabs.setSkin("helvex"); mytabs.setPagingSkin("bricks"); mytabs.setColSorting("na,na,na,na"); </script> /***** i included the next js and css <link rel="STYLESHEET" type="text/css" href="../css/dhtmlxgrid.css"> <link rel="STYLESHEET" type="text/css" href="../css/dhtmlxgrid_skins.css"> <link rel="STYLESHEET" type="text/css" href="../styles/estilos.css"> <link rel="STYLESHEET" type="text/css" href="../css/dhtmlxwindows.css"> <link rel="STYLESHEET" type="text/css" href="../css/dhtmlxwindows_dhx_blue.css"> <link rel="STYLESHEET" type="text/css" href="../css/dhtmlxgrid_pgn_bricks.css"> <script src="../js/dhtmlxcommon.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid.js" type="text/javascript"></script> <script src="../js/dhtmlxgridcell.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid_srnd.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid_excell_link.js" type="text/javascript"></script> <script src="../js/dhtmlxcalendar.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid_excell_dhxcalendar.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid_pgn.js" type="text/javascript"></script> <script src="../js/dhtmlxgrid_start.js" type="text/javascript"></script> many thanks in advance for your reply Answer posted by dhxSupport on Jul 02, 2009 03:33 Unfortunately we cannot reproduce this issue locally. What version of dhtmlxGrid do you use? Could you please provide full example where we can reproduce this issue including files which you are using to initialize grid and custom skin .css file. (You can send this example directly to the support@dhtmlx.com) Answer posted by dhxSupport on Jul 02, 2009 03:46 To fix this issue try to call multi line mode before grid was init: <?php echo '<table border="0" id="tab_list" name="tab_list" width="100%" lightnavigation="false" oninit="" onbeforeinit="makeMultiline()">'; ... <script> function makeMultiline(){ tab_list.enableMultiline(true); } </script> Answer posted on Jul 02, 2009 06:54 >>onbeforeinit="makeMultiline()">'; many thanks in advance, the solution was on call multi line on before grid init.
|