You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/grid/filtering.md
+119Lines changed: 119 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ In this article:
17
17
*[Basics](#basics)
18
18
*[Filter Row](#filter-row)
19
19
*[Filter Menu](#filter-menu)
20
+
*[Toolbar Search Box](#toolbar-search-box)
20
21
*[Filter From Code](#filter-from-code)
21
22
*[More Examples](#more-examples)
22
23
@@ -152,6 +153,124 @@ A key difference in the behavior from the [filter row](#filter-row) is that the
152
153

153
154
154
155
156
+
157
+
## Toolbar Search Box
158
+
159
+
You can add a search box in the grid toolbar that lets the user type their query and the grid will look up all visible string columns with a case-insensitive `Contains` operator, and filter them accordingly. You can change the filter delay, and the fields the grid will use - see the [Customize the SearchBox](#customize-the-searchbox) section below.
160
+
161
+
The search box is independent from the standard filters. If you have filters applied, the searchbox will amend and respect them. Thus, you can also apply filtering to results returned from the search box.
162
+
163
+
To enable the search box, add the `<GridSearchBox>` tag in the `<GridToolBar>`.
The `GridSearchBox` component offers the following settings to customize its behavior:
218
+
219
+
*`DebounceDelay` - the time in `ms` with which the typing is debounced. This provides a performance optimization when using the `OnRead` event - filtering does not happen on every keystroke anymore. The default value is `300`.
220
+
221
+
*`Fields` - a list of `string` that denotes the fields names that the gris should search in. By default, the grid looks in all string fields in its currently visible columns, and you can define a subset of that.
222
+
223
+
*`Class` - a CSS class rendered on the wrapper of the searchbox so you can customize its appearance.
224
+
225
+
>caption Customize the search box to have a long filter delay and to only use certain fields
226
+
227
+
````CSHTML
228
+
@* Increased delay and a subset of the columns are allowed for filtering *@
Copy file name to clipboardExpand all lines: components/treelist/filtering.md
+209Lines changed: 209 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ In this article:
17
17
*[Basics](#basics)
18
18
*[Filter Row](#filter-row)
19
19
*[Filter Menu](#filter-menu)
20
+
*[Toolbar Search Box](#toolbar-search-box)
20
21
21
22
22
23
## Basics
@@ -202,6 +203,214 @@ A key difference in the behavior from the [filter row](#filter-row) is that the
202
203
203
204

204
205
206
+
207
+
## Toolbar Search Box
208
+
209
+
You can add a search box in the treelist toolbar that lets the user type their query and the treelist will look up all visible string columns with a case-insensitive `Contains` operator, and filter them accordingly. You can change the filter delay, and the fields the treelist will use - see the [Customize the SearchBox](#customize-the-searchbox) section below.
210
+
211
+
The search box is independent from the standard filters. If you have filters applied, the searchbox will amend and respect them. Thus, you can also apply filtering to results returned from the search box.
212
+
213
+
To enable the search box, add the `<TreeListSearchBox>` tag in the `<TreeListToolBar>`.
The `TreeListSearchBox` component offers the following settings to customize its behavior:
314
+
315
+
*`DebounceDelay` - the time in `ms` with which the typing is debounced. Filtering does not happen on every keystroke and that can reduce the flicker for the end user. The default value is `300`.
316
+
317
+
*`Fields` - a list of `string` that denotes the fields names that the gris should search in. By default, the treelist looks in all string fields in its currently visible columns, and you can define a subset of that.
318
+
319
+
*`Class` - a CSS class rendered on the wrapper of the searchbox so you can customize its appearance.
320
+
321
+
>caption Customize the search box to have a long filter delay and to only use certain fields
0 commit comments