The App.dataTable.DataTable is responsible for rendering a DataTable given an server side XML configuration. The module wraps datatables and works internally with the datatables api
Input
// The module is instantiated with the following input
var input = {
widget: widget, // the widget that instantiated this data table
element: element, // the dom element where the data table should be rendered
context: context, // object containing current context ids
// specific options for this data table instance. Populated from the server side xml configuration
options: {
bindKey: "bindkey", // a string that binds this instance to the server side table instance. Used to clean up server side cache
columns: [], // an array of column objects, populated from the server config file
lengthMenu: [], // an array of integers, what values should the end up in the pagination menu
paginated: true, // boolean, that indicates whether the table should be paginated or not
paginationSize: 15, // integer, the default number of rows to show
responsive: true, // boolean, whether the table should be responsive or not
rowSelect: 'multi', // string, what kind of row select is configured, valid values: 'none', 'single' or 'multi'
serverSide: 'false', // boolean, whether sorting, filtering and pagination should be done on the client or the server
sortOrder: [[]], // array of arrays, that decides the initial sort order
sortable: true, // boolean, whether the array should be sortable or not
tableConfig: "TableConfig.xml", // string, reference to the server side xml configuration
toolbar: toolbar // object, object that is used to configure the toolbar
}
};
new App.dataTable.create(input);
Classes
Namespaces
Methods
(static) changeDisplayDensity()
Changes display density for a table
(static) create()
Create instance of App.dataTable.DataTable widget by providing input as described above.
Example
App.dataTable.create(input)
(static) createAndConnectRow()
Creates a new row based on the columns in the table and connects it to the context or selected object.
(static) createNewRow()
Creates a new row based on the columns in the table.
(static) expandAll()
Fully expands all root nodes
(static) exportCsv()
Export rows to csv
(static) exportExcel()
Export rows to excel
(static) exportPdf()
Export rows to PDF
(static) searchAndConnect(data)
Parameters:
Name | Type | Description |
---|---|---|
data |
object | used to search and connect objects to selected object |
(static) tableConfigurator(data)
Parameters:
Name | Type | Description |
---|---|---|
data |
object | creates and manages tables and columns |
(static) toggleColumnVisibilityMenu(data)
Parameters:
Name | Type | Description |
---|---|---|
data |