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/columns/menu.md
+76-14Lines changed: 76 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,13 @@ The Grid allows you to setup a menu for its columns. It enables you to perform h
15
15
>caption In this article:
16
16
*[Basics](#basics)
17
17
*[Features](#features)
18
-
*[Sorting](#sorting)
18
+
*[Column Chooser](#column-chooser)
19
19
*[Filtering](#filtering)
20
+
*[Groupable](#groupable)
20
21
*[Frozen Columns](#frozen-columns)
21
-
*[Column Chooser](#column-chooser)
22
22
*[Sections](#sections)
23
+
*[Sorting](#sorting)
24
+
*[Reorderable](#reorderable)
23
25
*[Example](#example)
24
26
*[Notes](#notes)
25
27
@@ -73,15 +75,26 @@ You can see the what the column menu can do and how to control its settings in t
73
75
74
76
To control the common features of the `Column Menu` use the `<GridColumnMenuSettings>` tag, nested inside the `<GridSettings>` tag:
75
77
76
-
*[Sorting](#sorting)
78
+
*[Column Chooser](#column-chooser)
77
79
*[Filtering](#filtering)
80
+
*[Groupable](#groupable)
78
81
*[Frozen Columns](#frozen-columns)
79
-
*[Column Chooser](#column-chooser)
80
82
*[Sections](#sections)
83
+
*[Sorting](#sorting)
84
+
*[Reorderable](#reorderable)
81
85
82
-
### Sorting
86
+
### Column Chooser
87
+
88
+
The Column Chooser in the Column Menu and allows you to toggle the visiblity of Grid columns from the Column Menu. By the default all columns are visible under the `Columns` section of the Column Menu (click the Columns item to expand it).
89
+
90
+
The **Apply** button will set column visibility, according to the current checkbox values, and close the column menu. The **Reset** button will revert the checkbox values to their state when the column menu was opened. At this point the user can start over, click on **Apply** or click outside the column menu to close it.
To disable the column chooser, set the `ShowColumnChooser` parameter of the `<GridColumnMenuSettings>` to `false`.
95
+
96
+
To hide a column from the Column Chooser set the `VisibleInColumnChooser` property of the column to `false`.
83
97
84
-
To remove the sorting option from the Column Menu set the `Sortable` parameter of the `GridColumnMenuSettings` tag to `false`.
85
98
86
99
### Filtering
87
100
@@ -90,21 +103,21 @@ To control whether filtering is possible from the Column Menu set the `FilterMod
90
103
*`None` - disables the filtering from the Column Menu. This is the recommended option if you use [`FilterRow` mode]({%slug grid-filter-row%}).
91
104
*`FilterMenu` - enables a filter menu to apply filtering.
92
105
93
-
>important Do not mix [`FilterRow`]({%slug grid-filter-row%}) mode with [`FilterMenu`]({%slug grid-filter-menu%}) in the Column Menu. These filtering modes provide different UI and filter inputs. Combining them may mislead the user about the applied filters.
106
+
### Groupable
94
107
95
-
### Frozen Columns
108
+
To group the Grid from the Column Menu set the `Groupable` parameter of the `GridColumnMenuSettings` tag to `true`. This feature will group the component by the column you have opened the Column Menu from.
96
109
97
-
To disable locking and unlocking of a column from the Column Menu, set the `Lockable` parameter of the `GridColumnMenuSettings` to `false`.
110
+
### Frozen Columns
98
111
99
-
### Column Chooser
112
+
To disable locking and unlocking of a column from the Column Menu, set the `Lockable` parameter of the column to `false`.
100
113
101
-
The Column Chooser in the Column Menu allows you to toggle the visibility of the Grid columns from the Column Menu. By the default, all columns are visible under the `Columns` section of the Column Menu (click the Columns item to expand it).
114
+
### Sorting
102
115
103
-
The **Apply** button will set the column visibility according to the current checkbox values and will close the column menu. The **Reset** button will revert the checkbox values to the state they had when the column menu was opened. At this point, the user can start over, click **Apply**, or click outside the column menu to close it.
116
+
To remove the sorting option from the Column Menu, set the `Sortable` parameter of the `GridColumnMenuSettings` tag to `false`.
104
117
105
-
To disable the column chooser, set the `ShowColumnChooser` parameter of the `<GridColumnMenuSettings>` to `false`.
118
+
### Reorderable
106
119
107
-
To hide a column from the Column Chooser set the `VisibleInColumnChooser` property of the column to `false`.
120
+
To allow column reordering from the Column Column, set the `Reorderable` parameter of the `GridColumnMenuSettings` tag to `true`.
108
121
109
122
### Sections
110
123
@@ -187,6 +200,55 @@ The columns in the Column Chooser are divided into sections. The Lockable option
187
200
}
188
201
````
189
202
203
+
### Example of Column Menu Features Settings
204
+
205
+
>caption Use the GridColumnMenuSettings tag to control the common features of the Column Menu, use column parameters to affect its relationship with the column menu
206
+
207
+
````CSHTML
208
+
@* Disable filtering and locking columns, hide a column from the chooser (Team), disable the menu for a column (Name). *@
public IEnumerable<SampleData> MyData = Enumerable.Range(1, 30).Select(x => new SampleData
235
+
{
236
+
Id = x,
237
+
Name = "name " + x,
238
+
Team = "team " + x % 5,
239
+
HireDate = DateTime.Now.AddDays(-x).Date
240
+
});
241
+
242
+
public class SampleData
243
+
{
244
+
public int Id { get; set; }
245
+
public string Name { get; set; }
246
+
public string Team { get; set; }
247
+
public DateTime HireDate { get; set; }
248
+
}
249
+
}
250
+
````
251
+
190
252
## Notes
191
253
192
254
* Applying settings to a Grid column like `Filterable="false"`, `Sortable="false"`, `Lockable="false"` will take precendence over the common settings applied in the `<GridColumnMenuSettings>` and disable the above-mentioned functionalities for the corresponding column.
0 commit comments