1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="option">
<name>searchCols</name>
<summary>Define an initial search for individual columns.</summary>
<since>1.10</since>
<type type="array" />
<description>
Basically the same as the `dt-init search` option, but in this case for individual columns, rather than the global filter, this option defined the filtering to apply to the table during initialisation.
The array must be of the same size as the number of columns, and each element be an object with the parameters `search` and `escapeRegex` (the latter is optional). 'null' is also accepted and the default will be used.
</description>
<example title="Set initial filtering on second and fourth columns"><![CDATA[
$('#example').dataTable( {
"searchCols": [
null,
{ "search": "My filter" },
null,
{ "search": "^[0-9]", "escapeRegex": false }
]
} );
]]></example>
<related type="option">search</related>
<related type="option">search</related>
<related type="option">columns.searchable</related>
<related type="api">column().search()</related>
<related type="api">columns().search()</related>
</dt-option>
|