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: controls/multiselect/functionality/filtering.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,3 +7,72 @@ tags: filtering,client,server
7
7
published: True
8
8
position: 2
9
9
---
10
+
11
+
# Filtering
12
+
13
+
**RadMultiSelect** lets the user type a search query in the input and it will filter the data source so only relevant items are shown. By default, the filter operation is performed on the client, over the current data. You can also use [server filtering](#server-filtering).
14
+
15
+
To enable filtering set the `Filter` property to the desired filter operation:
16
+
17
+
* `Contains`
18
+
* `StartsWith`
19
+
* `EndsWith`
20
+
21
+
The `MinLength` property defines the minimum input length before the filter operation is performed.
22
+
23
+
>caution When you apply server filtering, only the source of **RadMultiSelect** is filtered. To page and filter the dataset, use the [virtualization]({%slug multiselect/functionality/virtualization%}) feature.
24
+
>
25
+
26
+
>caption Example 1: Basic filtering in RadMultiSelect - the `name` field will be searchable
>tip Client filtering will work with both client-side and server-side binding. If used with a declarative data source, it will serialize its data to an array on the client, just like it would behave if the data was fetched from a web service call.
46
+
47
+
## Server Filtering
48
+
49
+
When you set the `WebServiceClientDataSource.EnableServerFiltering` property to `true`, filtering will request the data from the server.
50
+
51
+
This can be useful when there is a lot of data that would slow down the browser by creating a lot of elements, or would be costly to the server. Combined with `MinLength`, you can improve the performance for both the client, and the server.
52
+
53
+
The server filtering requires binding to a web service, and it will result in GET requests where querystring parameters will denote the filtered field and operator. For example, if the `ProductName` field is set as the `DataValueField`, `Filter` is `Contains` and the user input is `che`, the parameter added to the URL will look something like `&$filter=substringof('che',tolower(ProductName))"`.
54
+
55
+
With server filtering, **RadMultiSelect** will not request the data when initializing, only when the user types in a search string of sufficient length (see `MinLength`). This is done by setting the `autoBind` property of the underlying Kendo widget to `false`.
0 commit comments