Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:table_to_jqgrid [2009/07/27 15:28] tony |
wiki:table_to_jqgrid [2010/07/02 21:45] rocketmonkeys Formatting |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Description ====== | ||
+ | Convert existing html table to grid. | ||
+ | ===== Author: ===== | ||
+ | Peter Romianowski | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | In order to use this module you should mark the Table to Grid (in Other modules) when you download the grid. For more information refer to [[Download]].\\ | ||
+ | For Developers - this is the grid.tbltogrid.js in the src directory. | ||
+ | |||
+ | ===== Calling Convention: ===== | ||
+ | <code javascript> | ||
+ | tableToGrid(selector, options) | ||
+ | </code> | ||
+ | |||
+ | <note>This is function and not a method</note> | ||
+ | |||
+ | where | ||
+ | * selector(string) can be either the table's class or id | ||
+ | * options is array with grid options | ||
+ | |||
+ | The html table should have the following structure: | ||
+ | |||
+ | <code html> | ||
+ | <table class="mytable"> (or <table id="mytable">) | ||
+ | <tr> | ||
+ | <th> header 1 </th> | ||
+ | <th> header 2 </th> | ||
+ | ... | ||
+ | </tr> | ||
+ | <tbody> | ||
+ | <tr> | ||
+ | <td> data 1 </td> | ||
+ | <td> data 1 </td> | ||
+ | ... | ||
+ | </tr> | ||
+ | <tr> | ||
+ | ... | ||
+ | </tr> | ||
+ | .... | ||
+ | </tbody> | ||
+ | <table> | ||
+ | </code> |