Wiki

Clone wiki

grails-datatables / visible

visible

Values

Name Type Values Default
visible boolean true, false true

Description

visible is a column option that allows you to specify whether a column is visible in the table. Note that even if visible is set to false, the column will still exist in the table. This is significant because it means that the data is still being retrieved from the database and downloaded. This scenario can be useful where you need to access some of the table data via JavaScript while not displaying it in the table.

The difference between visible="false" and include="none" is that include="none" will prevent the column from being included in the table at all. For example, if you are using a column just for filtering the data, then you would use include="none" to prevent it from being downloaded to the table.

Example

<dt:datatable name="MyTable" domainClass="this.is.my.DomainClass" serverSide="true">
    <dt:column name="myFirstProperty"/>
    <dt:column name="mySecondProperty" visible="false"/>
</dt:datatable>

See Also

include


Back to Options.

Updated