searchBuilder.preDefined.criteria.type
The data type of the column.
Please note - this property requires the SearchBuilder extension for DataTables.
Description
This property is only required in the searchBuilder.preDefined
object when using server-side processing. This means that the server can tell the type of the field that the search is being applied to. In some cases this is required as the behaviour of some conditions are slightly different between column types. When using a client-side configuration this property will make no changes to the behaviour of SearchBuilder.
The other extra option that is required when using server-side processing is the searchBuilder.preDefined.criteria.origData
property that is used to tell the server-side scripts what field to filter on.
For more information on preDefined searches please refer to the searchBuilder.preDefined
option or the manual page.
Type
Default
- Value:
undefined
Example
Defining a preDefined criteria for the Office column:
$('#example').DataTable( {
dom: 'Qlfrtip',
searchBuilder: {
preDefined: {
criteria:[
{
condition: '=',
data: 'Office',
type: 'string',
value: ['Edinburgh']
}
],
logic: 'AND'
}
}
});
Related
The following options are directly related and may also be useful in your application development.