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
@@ -31,24 +32,24 @@ By default, the Grid looks in all string fields in its currently visible columns
31
32
32
33
If you want to search in the hidden fields of the Grid, do the following:
33
34
34
-
*Use the Grid with an [OnReadhandler]({%slug components/grid/manual-operations%}).
35
-
* In the OnRead handler, [check if there is a filter applied]({%slug components/grid/manual-operations%}#get-information-from-the-datasourcerequest).
36
-
* The applied filter must be of type [CompositeFilterDescriptor](https://docs.telerik.com/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). Plain `FilterDescriptors` at root level (`args.Request.Filters`) are generated by the filter row. The composite filter descriptor has a `FilterDescriptors` property, which holds a collection plain [single-field FilterDescriptors](https://docs.telerik.com/blazor-ui/api/Telerik.DataSource.FilterDescriptor). Each of them targets one of the visible columns.
37
-
* Obtain the search string from the `Value` property of any of the descriptors in the above collection.
38
-
* Add one additional `FilterDescriptor` to the above collection that targets the hidden column.
35
+
*Bind the Grid with an [`OnRead` event handler]({%slug common-features-data-binding-onread%}).
36
+
* In the `OnRead` handler, [check if there is a filter applied]({%slug components/grid/manual-operations%}#get-information-from-the-datasourcerequest) in `args.Request.Filters`.
37
+
* The applied filters are of type [`CompositeFilterDescriptor`](https://docs.telerik.com/blazor-ui/api/Telerik.DataSource.CompositeFilterDescriptor). The composite filter descriptor has a `FilterDescriptors` property, which holds a collection plain [single-field `FilterDescriptor`s](https://docs.telerik.com/blazor-ui/api/Telerik.DataSource.FilterDescriptor). Each of the `FilterDescriptor` in the search descriptor targets one of the visible columns.
38
+
* Obtain the search string from the `SearchFilter` property of the Grid state. It holds a `CompositeFilterDescriptor` too.
39
+
* Add one additional `FilterDescriptor` to the search `CompositeFilterDescriptor` for every hidden column.
39
40
40
-
Here is an example:
41
+
>caption Search in hidden Grid columns
41
42
42
43
````CSHTML
43
44
@using Telerik.DataSource.Extensions
44
45
@using Telerik.DataSource
45
46
46
-
<TelerikGrid TItem="@GridItem"
47
-
OnRead="@GridReadHandler"
47
+
<TelerikGrid @ref="@GridRef"
48
+
TItem="@GridItem"
49
+
OnRead="@OnGridRead"
48
50
FilterMode="@GridFilterMode.FilterRow">
49
51
<GridToolBarTemplate>
50
52
<strong style="color:#900">Search for "secret#", where # is the ID number:</strong>
0 commit comments