|
1 | 1 | --- |
2 | 2 | layout: post |
3 | | -title: Column Chooser in Blazor Tree Grid Component | Syncfusion |
4 | | -description: Checkout and learn here all about column chooser in Syncfusion Blazor Tree Grid component and much more details. |
| 3 | +title: Column Chooser in Blazor TreeGrid Component | Syncfusion |
| 4 | +description: Checkout and learn here all about column chooser in Syncfusion Blazor TreeGrid component and much more details. |
5 | 5 | platform: Blazor |
6 | | -control: Tree Grid |
| 6 | +control: TreeGrid |
7 | 7 | documentation: ug |
8 | 8 | --- |
9 | 9 |
|
10 | | -# Column Chooser in Blazor Tree Grid Component |
| 10 | +# Column Chooser in Blazor TreeGrid Component |
11 | 11 |
|
12 | | -The column chooser has options to show or hide columns dynamically. It can be enabled by defining the [ShowColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowColumnChooser.html) as true. |
| 12 | +The column chooser provides options to dynamically show or hide columns at runtime. Enable it by setting the [ShowColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowColumnChooser.html) property to true. |
13 | 13 |
|
14 | 14 | {% tabs %} |
15 | 15 |
|
@@ -78,11 +78,11 @@ public class TreeData |
78 | 78 |
|
79 | 79 |  |
80 | 80 |
|
81 | | -N> The column names can be hidden in the column chooser by defining the [ShowInColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowInColumnChooser.html) property as false. |
| 81 | +N> Specific columns can be excluded from the column chooser by setting the [ShowInColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumn.html#Syncfusion_Blazor_TreeGrid_TreeGridColumn_ShowInColumnChooser) property to false on the corresponding column. |
82 | 82 |
|
83 | 83 | ## Open column chooser by external button |
84 | 84 |
|
85 | | -The column chooser has options to show or hide columns dynamically. It can be enabled by defining the [ShowInColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowInColumnChooser.html) as true. |
| 85 | +Open the column chooser programmatically, for example from an external button, by invoking the `OpenColumnChooser` method on the TreeGrid instance. Ensure [ShowColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowColumnChooser.html) is enabled. |
86 | 86 |
|
87 | 87 | {% tabs %} |
88 | 88 |
|
@@ -157,17 +157,17 @@ public class TreeData |
157 | 157 |
|
158 | 158 | {% endtabs %} |
159 | 159 |
|
160 | | - |
| 160 | + |
161 | 161 |
|
162 | | -N> The column names in column chooser can be hidden by defining the [ShowInColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.SfTreeGrid~ShowInColumnChooser.html) property as false. |
| 162 | +N> Specific columns can be excluded from the column chooser by setting the [ShowInColumnChooser](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor~Syncfusion.Blazor.TreeGrid.TreeGridColumn~ShowInColumnChooser.html) property to false on the corresponding column. |
163 | 163 |
|
164 | 164 | ## Template support in column chooser |
165 | 165 |
|
166 | | -Template can be rendered in column chooser of tree grid by customizing the column chooser using **Template** and **FooterTemplate** of the [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html) Component. |
| 166 | +Render a custom template in the column chooser by configuring the **Template** and **FooterTemplate** of the [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html) component. |
167 | 167 |
|
168 | | -Below example demonstrates simple column chooser template using [TreeGridColumnChooserItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItem.html) inside the [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html) Component. |
| 168 | +The following example demonstrates a simple column chooser template using [TreeGridColumnChooserItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItem.html) within [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html). |
169 | 169 |
|
170 | | -`ColumnChooserTemplateContext` is accessible inside the `Template` from which we can access column details inside `Template` and handle template rendering of column chooser. |
| 170 | +Use `ColumnChooserTemplateContext` inside the `Template` to access column details and control template rendering of the column chooser. |
171 | 171 |
|
172 | 172 | {% tabs %} |
173 | 173 |
|
@@ -259,11 +259,11 @@ namespace TreeGridComponent.Data |
259 | 259 |
|
260 | 260 | {% endtabs %} |
261 | 261 |
|
262 | | - |
| 262 | + |
263 | 263 |
|
264 | 264 | ### Custom component in column chooser template |
265 | 265 |
|
266 | | -In below example, we have rendered ListView as custom component inside the Template of [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html) in tree grid. Inside the custom component, we have added image in ListView Template. |
| 266 | +In the following example, a ListView is rendered as a custom component inside the `Template` of [TreeGridColumnChooserSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserSettings.html) in the TreeGrid. Inside the custom component, an image is added in the ListView template. |
267 | 267 |
|
268 | 268 | {% tabs %} |
269 | 269 |
|
@@ -486,11 +486,11 @@ namespace TreeGridComponent.Data |
486 | 486 |
|
487 | 487 | The following output is displayed as a result of the above code example. |
488 | 488 |
|
489 | | - |
| 489 | + |
490 | 490 |
|
491 | 491 | ### Column Chooser with group template |
492 | 492 |
|
493 | | -We can also group the columns inside the column chooser template with the help of Group Template. To group columns we need to wrap [TreeGridColumnChooserItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItem.html) inside [TreeGridColumnChooserItemGroup](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItemGroup.html) as shown in the below example code. |
| 493 | +Columns can also be grouped inside the column chooser template using a group template. To group columns, wrap [TreeGridColumnChooserItem](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItem.html) inside [TreeGridColumnChooserItemGroup](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.TreeGrid.TreeGridColumnChooserItemGroup.html) as shown in the following example. |
494 | 494 |
|
495 | 495 | {% tabs %} |
496 | 496 |
|
@@ -591,4 +591,7 @@ namespace TreeGridComponent.Data |
591 | 591 |
|
592 | 592 | The following output is displayed as a result of the above code example. |
593 | 593 |
|
594 | | - |
| 594 | + |
| 595 | + |
| 596 | + |
| 597 | + |
0 commit comments