design - Good ways to display long rows of data -


i need display records of information database users. currently, have info bound datagrid. however, there many fields display , tables going off page. don't want pages have horizontal scrolling, , don't want decrease font size.. wondering if had better ideas go displaying long rows of data? ask if additional info needed, thx :)

my go-to solution round essential information (anything identify what/who row's about) , put rest in following row in new td , interior table. hide/show javascript, , you're golden.

example html

<tr>     <td>joe</td>     <td>jones</td>     <td>555-555-5555 (m)</td>     <td class="more">more..</td> </tr> <tr class='showme'>     <td class='showthis' colspan="4">         <h2>more info</h2>         <table>             <!-- yet more info here -->         </table>     </td> </tr> 

jquery make work

$("td.more").click(function(){     // don't hide/show next tr itself, may cause cross-browser issues     $(this).closest("tr").next("tr.showme").find(".showthis").slidetoggle(); }); 

necessary css

.showthis { display:none; } /* you'll want play padding , such open/close states, */ 

you can make lot more sophisticated, of course, basic functionality.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -