Skip to main content

IMPORTANT - Product End of Life Statement - IMPORTANT

Request RE, Survey, and Calendar 1.5 Support Ending December 31, 2020
Contact Kinetic Data Support with Questions
Kinetic Community

Datatable Renderer

Description

The Datatable Renderer uses the DataTables Table plug-in for jQuery to display the search results.

Example: Results as a DataTable

Requirements

Requirements in addition to those of KDSearch

  • datatables-1.10.X data tables directory 
  • (Optional) datatables-responsive-plugin data tables directory 

Configuration

Configuration and options are provided to the renderer schema via a nested JSON.  The Renderer JSON is a subschema to the Configuration JSON for KDSearch.  Name:Value pairs provide KDSearch the desired behaviors.

type: (function)
KDSearch.Renderers.UnorderedList
options: (nested JSON schema)
Values supplied here are specific to the Renderer and define the behavior of the Renderer.
  processSingleResult: (Boolean) 
(Optional defauted "false") "true" or "false" value to indicate the behavior if one result it returned from the search.  "true" indicates the "clickCallback" function will be executed.
  responsive: (Boolean) 
(Optional defauted "false") "true" or "false" value to indicate if the DataTable will use the Responsive plug-in
  Any of the DataTable options can be used in the options schema.  See full list at: https://datatables.net/reference/option/

Example:

type: KDSearch.Renderers.DataTables,
options: {
    processSingleResult: true,
    responsive: true,
    fnFooterCallback: function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
    },
    dom: 'Bfrtip',
    createdRow: function ( row, data, index ) {
    },
    pageLength: 15,
}

Styling

Custom styling may be applied to the Datatable Renderer.  See DataTables Styling documentation for additional information.