Single Search Filter
Index
Description
Some users might want to have 1 main single search for filtering the grid data instead of using multiple column filters. You can see a demo of that below.
Note the code below came from a different SlickGrid framework, just change the
.bindto whatever framework you use with the appropriate code change. It's only meant to show roughly how to do it.
Code Sample
View
<form class="form-inline">
<div class="form-group">
<label>
Single Search:<br>
</label>
<select value.bind="selectedColumn"
class="form-control">
<option repeat.for="column of columnDefinitions"
model.bind="column">
${column.name}
</option>
</select>
</div>
<select value.bind="selectedOperator"
class="form-control">
<option repeat.for="operator of operatorList"
model.bind="operator">
${operator}
</option>
</select>
<input type="text"
class="form-control"
placeholder="search value"
value.bind="searchValue">
</form>
<div grid-id="grid21"
columns.bind="columnDefinitions"
options.bind="gridOptions"
dataset.bind="dataset">
</div>ViewModel
Sample

Last updated