Skip to main content
Kinetic Community

Data Viewer (CE) - Add a Checkbox to a Table or List

Overview

Checkboxes can be added to a Table or List in the configuration options of Data Viewer.

The "defaultContent" object can be used to add a checkbox in both a Table or List.   HTML content, which represents a checkbox, can be added to display the checkboxes.  

Example

The example below shows an example "data" object for configuration options in Data Viewer.

NOTE: The class of "control" is used to prevent triggering the item selection.  Without this class, clicking the checkbox will trigger the row selection.

data: [
    {
        title:"Checkbox",    
        defaultContent:"<input type='checkbox' class=''>",
        class:"control",
    },
],

When displaying a checkbox in a list or table, consider the title that is used.  

List Results

In a list result the title will display before each of the checkboxes.

Table Results 

In a table, the title will appear in the column header.

The header can be text

In some use cases, a checkbox in the title may be useful.  An event can be added to toggle all checkboxes in the table when the header checkbox is clicked.

 

data: [
    {
        title:"<input type='checkbox' class=''>",    
        defaultContent:"<input type='checkbox' class=''>",
        class:"control",
    },
],