Categories | Question details Back To List | ||||||||
adding links to cells while dhtmlXGridFromTable Hi, I'm trying to place a link in one of the cells in the table. <tr class="thead"> <th type="link">Username</th> <th>Name</th> <th sort="str">Class</th> <th sort="str">Class Number</th> <th sort="str">Phone# (Home)</th> <th sort="str">Phone# (Mobile)</th> <th sort="str">Gradin Fee Paid</th> <th sort="str">Gradin Fee Payment Notes</th> </tr> <tr class="trow"> <td><strong><a href="user-edit.php?user_id=2&wp_http_referer=%2Fgradin%2Fwp-admin%2Fusers.php%3Fpage%3Dau_extended">leungpokyin</a> </strong></td> <td type="ro">Victor </td> <td type="ro">7C </td> <td type="ro">10 </td> <td type="ro">23936 </td> <td type="ro">91575 </td> <td type="ro">YES </td> <td type="ro">Self Account Transfer</td> </tr> dhtmlxgrid_excell_link.js is included var mygrid = dhtmlXGridFromTable('records'); The above is part of the original table, I wonder what is the correct way to do this. I mean putting the link in the cell. I found that html tags are not happy going into cells. Thank you so much Answer posted by Support on Jun 04, 2008 01:26 The default way is to define column type as link and use plain value, without html tags <tr class="thead"> <th type="link">Username</th> <th>Name</th> <th sort="str">Class</th> <th sort="str">Class Number</th> <th sort="str">Phone# (Home)</th> <th sort="str">Phone# (Mobile)</th> <th sort="str">Gradin Fee Paid</th> <th sort="str">Gradin Fee Payment Notes</th> </tr> <tr class="trow"> <td>leungpokyin^user-edit.php?user_id=2&wp_http_referer=%2Fgradin%2Fwp-admin%2Fusers.php%3Fpage%3Dau_extended</td> <td>Victor </td> <td>7C </td> <td>10 </td> <td>23936 </td> <td>91575 </td> <td>YES </td> <td>Self Account Transfer</td> </tr> But you can use your initial approach, with inline HTML tags ( in such case you need not _link.js and can use "ro" column type for all columns ) - just update existing dhtmlxgrid_start.js with attached one - it will resolve problem with HTML tags inside source table. Attachments (1)
Answer posted by Victor on Jun 04, 2008 02:04 Thanks so much, the new dhtmlxgrid_start.js works wonderfully, thanks again.. |