Wiki
Clone wikigrails-datatables / deferInitialization
deferInitialization
Values
Name | Type | Values | Default |
---|---|---|---|
deferInitialization | boolean | true , false |
false |
Description
deferInitialization
is a table option that creates a function named initializeTableName
(where TableName
is the name of the table) that can be used to initialize the datatable sometime after the page is loaded. This may be useful if you are not sure whether the table will be used and do not wish to intialize it unnecessarily, or when you wish to prioritize another task.
Example
<dt:datatable name="MyTable" domainClass="this.is.my.DomainClass" serverSide="true" deferInitialization="true">
<dt:column name="myFirstProperty"/>
<dt:column name="mySecondProperty"/>
</dt:datatable>
<script type="JavaScript">
...
initializeMyTable();
...
</script>
<dt:datatable name="MyTable" domainClass="this.is.my.DomainClass" serverSide="true" deferInitialization="true"> <dt:column name="myFirstProperty"/> <dt:column name="mySecondProperty"/> </dt:datatable> <script type="JavaScript"> ... initializeMyTable(); ... </script>
Back to Options.
Updated