Skip to content

Commit 271cce8

Browse files
documentation(896909):Updated
1 parent 6e6a006 commit 271cce8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+910
-552
lines changed

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-chooser.md

Lines changed: 79 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,62 +8,118 @@ publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

11-
# Column Chooser
11+
# Column chooser in ASP.NET MVC Grid component
1212

13-
The column chooser has options to show or hide columns dynamically. It can be enabled by defining the [`ShowColumnChooser`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_ShowColumnChooser) as true.
14-
15-
{% if page.publishingplatform == "aspnet-core" %}
13+
The column chooser feature in the Syncfusion ASP.NET MVC Grid component allows you to dynamically show or hide columns. This feature can be enabled by defining the [ShowColumnChooser](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.grids.grid.html#Syncfusion_EJ2_Grids_Grid_ShowColumnChooser) property as **true**.
1614

1715
{% tabs %}
1816
{% highlight cshtml tabtitle="CSHTML" %}
19-
{% include code-snippet/grid/columns/columnchooser/tagHelper %}
17+
{% include code-snippet/grid/columns/columnchooser/razor %}
2018
{% endhighlight %}
2119
{% highlight c# tabtitle="Columnchooser.cs" %}
2220
{% include code-snippet/grid/columns/columnchooser/columnchooser.cs %}
2321
{% endhighlight %}
2422
{% endtabs %}
2523

26-
{% elsif page.publishingplatform == "aspnet-mvc" %}
24+
![Column chooser](../../images/column-chooser/Colum-chooser.png)
25+
26+
> The column chooser dialog displays the header text of each column by default. If the header text is not defined for a column, the corresponding column field name is displayed instead.
27+
28+
## Hide column in column chooser dialog
29+
30+
You can hide the column names in column chooser by defining the `Columns.ShowInColumnChooser` as **false**. This feature is useful when working with a large number of columns or when you want to limit the number of columns that are available for selection in the column chooser dialog.
31+
32+
In this example, the `Columns.ShowInColumnChooser` property is set to **false** for the **Order ID** column. As a result, the **Order ID** column will not be displayed in the column chooser dialog.
2733

2834
{% tabs %}
29-
{% highlight razor tabtitle="CSHTML" %}
30-
{% include code-snippet/grid/columns/columnchooser/razor %}
35+
{% highlight cshtml tabtitle="CSHTML" %}
36+
{% include code-snippet/grid/columns/columnchooser-hide/razor %}
3137
{% endhighlight %}
3238
{% highlight c# tabtitle="Columnchooser.cs" %}
33-
{% include code-snippet/grid/columns/columnchooser/columnchooser.cs %}
39+
{% include code-snippet/grid/columns/columnchooser-hide/columnchooser.cs %}
3440
{% endhighlight %}
3541
{% endtabs %}
36-
{% endif %}
3742

43+
![Hide column in column chooser dialog](../../images/column-chooser/Colum-chooser-hide.png)
3844

45+
>The `Columns.ShowInColumnChooser` property is applied to each column element individually. By setting it to **false**, you can hide specific columns from the column chooser dialog.
3946
40-
N> You can hide the column names in column chooser by defining the [`ShowInColumnChooser`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_ShowInColumnChooser) as false.
47+
## Open column chooser by externally
48+
49+
The Syncfusion ASP.NET MVC Grid provides the flexibility to open the column chooser dialog on a web page using an external button. By default, the column chooser button is displayed in the right corner of the grid component, and clicking the button opens the column chooser dialog below it. However, you can programmatically open the column chooser dialog at specific **X** and **Y** axis positions by using the `openColumnChooser` method.
50+
51+
Here's an example of how to open the column chooser in the Grid using an external button:
52+
53+
{% tabs %}
54+
{% highlight cshtml tabtitle="CSHTML" %}
55+
{% include code-snippet/grid/columns/columnchooser-external/razor %}
56+
{% endhighlight %}
57+
{% highlight c# tabtitle="Columnchooser.cs" %}
58+
{% include code-snippet/grid/columns/columnchooser-external/columnchooser.cs %}
59+
{% endhighlight %}
60+
{% endtabs %}
4161

42-
## Open column chooser by external button
62+
![Open column chooser by externally](../../images/column-chooser/Colum-chooser-external.png)
4363

44-
The Column chooser can be displayed on a page through external button by invoking the **openColumnChooser** method with X and Y axis positions.
64+
## Customize column chooser dialog size
65+
66+
The column chooser dialog in Syncfusion ASP.NET MVC Grid comes with default size, but you can modify its height and width as per your specific needs using CSS styles.
67+
To customize the column chooser dialog size, you can use the following CSS styles:
4568

46-
{% if page.publishingplatform == "aspnet-core" %}
69+
```css
70+
.e-grid .e-dialog.e-ccdlg {
71+
height: 500px;
72+
width: 200px;
73+
}
74+
.e-grid .e-ccdlg .e-cc-contentdiv {
75+
height: 200px;
76+
width: 230px;
77+
}
78+
```
4779

4880
{% tabs %}
4981
{% highlight cshtml tabtitle="CSHTML" %}
50-
{% include code-snippet/grid/columns/externalbutton/tagHelper %}
82+
{% include code-snippet/grid/columns/columnchooser-size/razor %}
5183
{% endhighlight %}
52-
{% highlight c# tabtitle="Externalbutton.cs" %}
53-
{% include code-snippet/grid/columns/externalbutton/externalbutton.cs %}
84+
{% highlight c# tabtitle="Columnchooser.cs" %}
85+
{% include code-snippet/grid/columns/columnchooser-size/columnchooser.cs %}
5486
{% endhighlight %}
5587
{% endtabs %}
5688

57-
{% elsif page.publishingplatform == "aspnet-mvc" %}
89+
![Customize column chooser dialog size](../../images/column-chooser/Colum-chooser-size.png)
90+
91+
## Change default search operator of the column chooser
92+
93+
The column chooser dialog in the Syncfusion ASP.NET MVC Grid provides a search box that allows you to search for column names. By default, the search functionality uses the "startsWith" operator to match columns and display the results in the column chooser dialog. However, there might be cases where you need to change the default search operator to achieve more precise data matching.
94+
95+
To change the default search operator of the column chooser in Syncfusion Grid, you need to use the [operator](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridColumnChooserSettings.html#Syncfusion_EJ2_Grids_GridColumnChooserSettings_Operator) property of the columnChooserSettings.
96+
97+
Here's an example of how to change the default search operator of the column chooser to **contains** in the ASP.NET MVC Grid:
5898

5999
{% tabs %}
60-
{% highlight razor tabtitle="CSHTML" %}
61-
{% include code-snippet/grid/columns/externalbutton/razor %}
100+
{% highlight cshtml tabtitle="CSHTML" %}
101+
{% include code-snippet/grid/columns/columnchooser-contains/razor %}
62102
{% endhighlight %}
63-
{% highlight c# tabtitle="Externalbutton.cs" %}
64-
{% include code-snippet/grid/columns/externalbutton/externalbutton.cs %}
103+
{% highlight c# tabtitle="Columnchooser.cs" %}
104+
{% include code-snippet/grid/columns/columnchooser-contains/columnchooser.cs %}
65105
{% endhighlight %}
66106
{% endtabs %}
67-
{% endif %}
68107

108+
![Change default search operator of the column chooser ](../../images/column-chooser/Colum-chooser-contains.png)
109+
110+
## Diacritics searching in column chooser
111+
112+
By default, the grid ignores diacritic characters when performing a search in the column chooser. However, in some cases, you may want to include diacritic characters in the search. To enable this behavior, you can set the [Columnchoosersettings.IgnoreAccent](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridColumnChooserSettings.html#Syncfusion_EJ2_Grids_GridColumnChooserSettings_IgnoreAccent) property to **true**.
113+
114+
Here is an example that demonstrates the usage of the `IgnoreAccent` property to include diacritic characters for searching in the column chooser:
115+
116+
{% tabs %}
117+
{% highlight cshtml tabtitle="CSHTML" %}
118+
{% include code-snippet/grid/columns/columnchooser-diacritics/razor %}
119+
{% endhighlight %}
120+
{% highlight c# tabtitle="Columnchooser.cs" %}
121+
{% include code-snippet/grid/columns/columnchooser-diacritics/columnchooser.cs %}
122+
{% endhighlight %}
123+
{% endtabs %}
69124

125+
![Diacritics searching in column chooser](../../images/columns/Column-headertext.png)

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/column-headers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

11-
# Headers in ##Platform_Name## Grid component
11+
# Headers in ASP.NET MVC Grid component
1212

13-
The Syncfusion ##Platform_Name## Grid component provides a comprehensive set of options to customize and manage headers efficiently. Headers play a crucial role in organizing and presenting data effectively in the grid.
13+
The Syncfusion ASP.NET MVC Grid component provides a comprehensive set of options to customize and manage headers efficiently. Headers play a crucial role in organizing and presenting data effectively in the grid.
1414

1515
## Header text
1616

17-
The `HeaderText` feature proves particularly beneficial when there is a need for more meaningful and descriptive column headers in the Syncfusion ##Platform_Name## Grid component.
17+
The `HeaderText` feature proves particularly beneficial when there is a need for more meaningful and descriptive column headers in the Syncfusion ASP.NET MVC Grid component.
1818

1919
By default, the header text of a column in Grid is displayed from the column's `Field` value. However, you can easily override the default header title and provide a custom header text for the column using the `HeaderText` property.
2020

@@ -37,9 +37,9 @@ To enable the `HeaderText` property, you simply need to define it in the **e-gri
3737
3838
## Header template
3939

40-
The header template feature in the Syncfusion ##Platform_Name## Grid component allows you to create custom header layouts and content, providing enhanced functionality such as sorting or filtering.
40+
The header template feature in the Syncfusion ASP.NET MVC Grid component allows you to create custom header layouts and content, providing enhanced functionality such as sorting or filtering.
4141

42-
To implement a header template, set the `HeaderTemplate` property within a specific column definition. This allows you to render custom HTML elements or ##Platform_Name## components to the header.
42+
To implement a header template, set the `HeaderTemplate` property within a specific column definition. This allows you to render custom HTML elements or ASP.NET MVC components to the header.
4343

4444
The following example demonstrate, the custom element is rendered for both **CustomerID**,**Freight** and **OrderDate** column headers.
4545

@@ -55,13 +55,13 @@ The following example demonstrate, the custom element is rendered for both **Cus
5555
![Header template](../../images/columns/Column-headertext-headerTemplate.png)
5656

5757
>* The `HeaderTemplate` property is only applicable to Grid columns that have a header element.
58-
>* You can use any HTML or ##Platform_Name## component in the header template to add additional functionality to the header element.
58+
>* You can use any HTML or ASP.NET MVC component in the header template to add additional functionality to the header element.
5959
6060
## Stacked header
6161

6262
In Grid, you can group multiple levels of column headers by stacking the Grid columns. This feature allows you to organize the Grid columns in a more structured and understandable way. This can be achieved by setting the [columns->columns](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Columns) property. Within this property, you can define an array of column objects to group together as sub-headers under a main header. You can define the `HeaderText` property of each sub-header column to set the text for that sub-header.
6363

64-
You can customize the appearance of the stacked header elements by using the `HeaderTemplate` property. This allows you to render custom HTML elements or ##Platform_Name## components to the header.
64+
You can customize the appearance of the stacked header elements by using the `HeaderTemplate` property. This allows you to render custom HTML elements or ASP.NET MVC components to the header.
6565

6666
Here's an example of how to use stacked headers with a custom `HeaderTemplate` in Syncfusion Grid.
6767

@@ -307,7 +307,7 @@ Here's an example of how to use the `BeforeRender` event to add a custom tooltip
307307
308308
## Customize header text styles
309309
310-
Customizing the grid header styles allows you to modify the appearance of the column header in the Grid control to meet your design requirements. You can customize the font, background color, and other styles of the header cells. To customize the header styles in the grid, you can use CSS, properties, methods, or event support provided by the Syncfusion ##Platform_Name## Grid component.
310+
Customizing the grid header styles allows you to modify the appearance of the column header in the Grid control to meet your design requirements. You can customize the font, background color, and other styles of the header cells. To customize the header styles in the grid, you can use CSS, properties, methods, or event support provided by the Syncfusion ASP.NET MVC Grid component.
311311
312312
### Using CSS
313313
@@ -414,7 +414,7 @@ The following example demonstrates how to add a `HeaderCellInfo` event handler t
414414
415415
## How to refresh header
416416
417-
The refresh header feature in the Syncfusion ##Platform_Name## Grid allows you to update the header section of the grid whenever changes are made to the grid's columns. This feature is useful when you want to reflect changes in the header immediately, such as modifying the column header text, width, or alignment.
417+
The refresh header feature in the Syncfusion ASP.NET MVC Grid allows you to update the header section of the grid whenever changes are made to the grid's columns. This feature is useful when you want to reflect changes in the header immediately, such as modifying the column header text, width, or alignment.
418418
419419
To use the refresh header feature, you can call the `refreshHeader` method of the Grid component. This method updates the grid header with the latest changes made to the columns.
420420

0 commit comments

Comments
 (0)