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: knowledge-base/grid-kb-only-one-filtermenu-option.md
+25-43Lines changed: 25 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,24 @@ page_title: Only one filter option in FilterMenu
6
6
slug: grid-kb-only-one-filtermenu-option
7
7
position:
8
8
tags:
9
-
ticketid: 1451755, 1551245
9
+
ticketid: 1451755, 1551245, 1705873
10
10
res_type: kb
11
11
---
12
12
13
13
## Environment
14
+
14
15
<table>
15
16
<tbody>
16
17
<tr>
17
18
<td>Product</td>
18
-
<td>Grid for Blazor</td>
19
+
<td>Grid for Blazor, <br /> TreeList for Blazor</td>
19
20
</tr>
20
21
</tbody>
21
22
</table>
22
23
23
24
24
25
## Description
26
+
25
27
I want simple filtering options in the Grid filter menu - both for my uses and my backend. How do I remove the extra conditions so it behaves like the filter row and does not have extra and/or operators?
26
28
27
29
>caption Before and after results
@@ -33,79 +35,59 @@ I want simple filtering options in the Grid filter menu - both for my uses and m
33
35
There are two options:
34
36
35
37
* Use a [custom filter template](slug:grid-templates-filter). It provides full flexibility over the interface and building the filter descriptor.
36
-
* Use custom CSS to [override the theme](slug:themes-override) and hide the elements that provide the and/or secondary conditions. The example below demonstrates this approach. Note that **the required CSS is different for different UI for Blazor versions**:
38
+
* Use custom CSS to [override the theme](slug:themes-override) and hide the elements that provide the and/or secondary conditions. The example below demonstrates this approach.
37
39
38
-
<divclass="skip-repl"></div>
39
-
````CSS
40
-
<style>
41
-
/* UI for Blazor 3.0+ */
42
-
.k-filter-menu-container>span:nth-child(n+3) {
43
-
display: none;
44
-
}
45
-
/* UI for Blazor 2.30- */
46
-
.k-filter-menu-container>div>:nth-child(n+3) {
47
-
display: none;
48
-
}
49
-
</style>
40
+
````CSS.skip-repl
41
+
.k-filter-menu-container > .k-button-group,
42
+
.k-filter-menu-container > span:nth-child(n+3) {
43
+
display: none;
44
+
}
50
45
````
51
46
52
-
>caption Hide And/Or filteroptions in the Grid/TreeList FilterMenu with CSS
47
+
>caption Hide And/Or ButtonGroup and second filter option in the Grid/TreeList FilterMenu with CSS
53
48
54
49
````RAZOR
55
-
@* Hide the secondary filter interface with CSS *@
0 commit comments