-
Notifications
You must be signed in to change notification settings - Fork 94
1.07 Rows counter
koalyptus edited this page Oct 10, 2017
·
6 revisions
Property | Type | Description | Remarks | Example |
---|---|---|---|---|
rows_counter | boolean|object | if set true, it will display the total # of rows displayed at the top of the table in left corner (default - false) |
var tfConfig = { rows_counter: true }; // or var tfConfig = { rows_counter: {} }; |
|
text | string | sets text for rows counter label (default - "Data rows: ") |
var tfConfig = { rows_counter: { text: 'Total items: ' } }; |
|
separator | string | Separator symbol appearing between the first and last visible rows of current page when paging is enabled. ie: Rows: 31-40 / 70 (default - "-") |
var tfConfig = { rows_counter: { separator: '—' } }; |
|
over_text | string | Separator symbol appearing between the first and last visible rows of current page and the total number of filterable rows when paging is enabled. ie: Rows: 31-40 / 70 (default - "/") |
var tfConfig = { rows_counter: { over_text: '\' } }; |
|
target_id | string | Define the id of the element that will contain the rows counter label (default - null) |
var tfConfig = { rows_counter: { target_id: 'myContainerId' } }; |
|
css_class | string | defines the css class of the rows counter label container (default + 'tot') |
var tfConfig = { rows_counter: { css_class: 'myCssClass' } }; |
|
toolbar_position | string | defines where it will be placed inside the toolbar (default - 'left') | 3 possible values: 'left', 'center' and 'right' |
var tfConfig = { rows_counter: { toolbar_position: 'center' } }; |
on_before_refresh_counter | function | callback fired before rows counter is refreshed | note that 2 parameters are passed to the callback function:
|
var tfConfig = { rows_counter: { on_before_refresh_counter: function(tf, elm) { console.log( 'Before rows counter is refreshed', tf, elm ); } } }; |
on_after_refresh_counter | function | callback fired after filters are cleared |
note that 3 parameters are passed to the callback function:
|
var tfConfig = { rows_counter: { on_after_refresh_counter: function(tf, elm, tot) { console.log( 'After rows counter is refreshed', tf, elm, tot ); } } }; |