Constructor
new RenderTable(optionsopt)
Constructor
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Properties
|
- Source:
Extends
Methods
addRow(data) → {Table}
Add a new row and populate with data
Parameters:
Name | Type | Description |
---|---|---|
data |
object |
- Inherited From:
- Source:
Returns:
- Type
- Table
appendRow($row) → {Table}
Add the row to the
Parameters:
Name | Type | Description |
---|---|---|
$row |
jQuery |
- Inherited From:
- Source:
Returns:
- Type
- Table
build(data) → {Table}
Build the entire table
Parameters:
Name | Type | Description | |
---|---|---|---|
data |
object | Array.<object> | object: an object of objects, where each object is a row of data All row objects are name-value pairs, where the names equal a [name] or [data-name] attribute within a row DOM element object[]: same as object, but instead an object of objects, it is an array of objects array: an array of data. This is the most simplest form of data and will simply be turned into | s with the data as the html |
- Inherited From:
- Source:
Returns:
- Type
- Table
createRow() → {jQuery}
Create a new row
- Inherited From:
- Source:
Returns:
- Type
- jQuery
deleteRow() → {RenderTable}
Delete a row based on its identifier
in the TemplateManager collection of rows
or simply pass the row data object itself
- Overrides:
- Source:
Returns:
- Type
- RenderTable
populateRow($row, data) → {Table}
Populate a row with data
The elements will be populated
Parameters:
Name | Type | Description |
---|---|---|
$row |
jQuery | row to populate |
data |
Array.<object> | array of data |
- Inherited From:
- Source:
Returns:
- Type
- Table
setRowTemplate(template) → {RenderTable}
Set the row template settings property
as well as the row manager's row template.
Parameters:
Name | Type | Description |
---|---|---|
template |
Row | Template |
- Source:
Returns:
- Type
- RenderTable
toggleEmpty(stateopt) → {Table}
Toggle the empty table message
and hide the thead and tfoot
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
state |
boolean |
<optional> |
true |
- Inherited From:
- Source:
Returns:
- Type
- Table
wipe() → {RenderTable}
Empty the tbody and clear cached data
- Overrides:
- Source:
Returns:
- Type
- RenderTable