Skip to content

Commit c6bf871

Browse files
896225: Searching Documentation
1 parent 1c36617 commit c6bf871

File tree

3 files changed

+29
-31
lines changed

3 files changed

+29
-31
lines changed

ej2-asp-core-mvc/code-snippet/grid/cell/gridlines/tagHelper

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
<div style="display: flex">
22
<label style="padding: 10px 10px 26px 0"> Change the Grid lines: : </label>
33
<span style="height:fit-content">
4-
<ejs-dropdownlist id="dropdown" dataSource="@ViewBag.dropdownData" change="Change"></ejs-dropdownlist>
4+
<ejs-dropdownlist id="dropdown" dataSource="@ViewBag.dropdownData" change="change"></ejs-dropdownlist>
55
</span>
66
</div>
77
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource">
88
<e-grid-columns>
9-
<e-grid-column field="NumberOfPatentFamilies" headerText="Number of Patent families" textAlign="Right"
10-
width="120"></e-grid-column>
11-
9+
<e-grid-column field="NumberOfPatentFamilies" headerText="Number of Patent families" textAlign="Right" width="120"></e-grid-column>
1210
<e-grid-column field="Inventor" headerText="Inventor Name" textAlign="Right" width="120"></e-grid-column>
1311
<e-grid-column field="NumberOfINPADOCPatents" headerText="NumberOfINPADOCPatents" width="150"></e-grid-column>
1412
<e-grid-column field="MainFieldsOfInvention" headerText="Main Fields Of Invention" width="150"></e-grid-column>
@@ -18,7 +16,7 @@
1816
</div>
1917

2018
<script type="text/javascript">
21-
function Change(args) {
19+
function change(args) {
2220
var grid = document.getElementById("Grid").ej2_instances[0];
2321
grid.gridLines = args.value;
2422
}

ej2-asp-core-mvc/grid/EJ2_ASP.MVC/cell.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Grid component allows you to customize the appearance and behavior of cells
1818

1919
Displaying HTML content in a Grid can be useful in scenarios where you want to display formatted content, such as images, links, or tables, in a tabular format. Grid component allows you to display HTML tags in the Grid header and content. By default, the HTML content is encoded to prevent potential security vulnerabilities. However, you can enable the `DisableHtmlEncode` property by setting the value as **false** to display HTML tags without encoding. This feature is useful when you want to display HTML content in a grid cell.
2020

21-
In the following example, the [EJ2 Toggle Switch Button](https://ej2.syncfusion.com/aspnetmvc/documentation/switch/getting-started) component is added to enable and disable the `DisableHtmlEncode` property. When the switch is toggled, the [change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.Switch.html#Syncfusion_EJ2_Buttons_Switch_Change) event is triggered and the `DisableHtmlEncode` property of the column is updated accordingly. The `refreshColumns` method is called to refresh the grid and display the updated content.
21+
In the following example, the [EJ2 Toggle Switch Button](https://ej2.syncfusion.com/aspnetmvc/documentation/switch/getting-started) component is added to enable and disable the `DisableHtmlEncode` property. When the switch is toggled, the [Change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.Switch.html#Syncfusion_EJ2_Buttons_Switch_Change) event is triggered and the `DisableHtmlEncode` property of the column is updated accordingly. The `refreshColumns` method is called to refresh the grid and display the updated content.
2222

2323
{% tabs %}
2424
{% highlight razor tabtitle="CSHTML" %}
@@ -36,7 +36,7 @@ In the following example, the [EJ2 Toggle Switch Button](https://ej2.syncfusion.
3636
> * If the property is set to **false**, the HTML tags will be removed and displayed as plain text.
3737
> * Disabling HTML encoding can potentially introduce security vulnerabilities, so use caution when enabling this feature.
3838
> * If [EnableHtmlSanitizer](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_EnableHtmlSanitizer) property of grid is set to true, then the content is sanitized to prevent any potential security vulnerabilities.
39-
> * You can also disable the `DisableHtmlEncode` property of the column using `getColumns` method on [change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.Switch.html#Syncfusion_EJ2_Buttons_Switch_Change) event of Switch component.This is demonstrated in the below code snippet,
39+
> * You can also disable the `DisableHtmlEncode` property of the column using `getColumns` method on [Change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Buttons.Switch.html#Syncfusion_EJ2_Buttons_Switch_Change) event of Switch component.This is demonstrated in the below code snippet,
4040
4141
```javascript
4242
function change(args) {
@@ -53,15 +53,15 @@ function change(args) {
5353

5454
The auto wrap feature allows the cell content in the grid to wrap to the next line when it exceeds the boundary of the specified cell width. The cell content wrapping works based on the position of white space between words. To support the Autowrap functionality in Syncfusion Grid, you should set the appropriate [Width](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Width) for the columns. The column width defines the maximum width of a column and helps to wrap the content automatically.
5555

56-
To enable auto wrap, set the [allowTextWrap](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_AllowTextWrap) property to **true**. You can also configure the wrap mode by setting the [textWrapSettings.wrapMode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridTextWrapSettings.html#Syncfusion_EJ2_Grids_GridTextWrapSettings_WrapMode) property.
56+
To enable auto wrap, set the [AllowTextWrap](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_AllowTextWrap) property to **true**. You can also configure the wrap mode by setting the [WrapMode](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.GridTextWrapSettings.html#Syncfusion_EJ2_Grids_GridTextWrapSettings_WrapMode) property.
5757

5858
Grid provides the below three options for configuring:
5959

6060
* **Both** - This is the default value for wrapMode. With this option, both the grid **Header** and **Content** text is wrapped.
6161
* **Header** - With this option, only the grid header text is wrapped.
6262
* **Content** - With this option, only the grid content is wrapped.
6363

64-
The following example demonstrates how to set the `allowTextWrap` property to **true** and specify the wrap mode as **Content** by setting the `textWrapSettings.wrapMode` property. Also change the `textWrapSettings.wrapMode` property to **Content** and **Both** on changing the dropdown value using the [change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.DropDowns.DropDownList.html#Syncfusion_EJ2_DropDowns_DropDownList_Change) event of the DropDownList component.
64+
The following example demonstrates how to set the `AllowTextWrap` property to **true** and specify the wrap mode as **Content** by setting the `WrapMode` property. Also change the `WrapMode` property to **Content** and **Both** on changing the dropdown value using the [Change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.DropDowns.DropDownList.html#Syncfusion_EJ2_DropDowns_DropDownList_Change) event of the DropDownList component.
6565

6666
{% tabs %}
6767
{% highlight razor tabtitle="CSHTML" %}
@@ -84,9 +84,9 @@ Customizing the grid cell styles allows you to modify the appearance of cells in
8484

8585
### Using event
8686

87-
To customize the appearance of the grid cell, you can use the [queryCellInfo](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_QueryCellInfo) event of the grid. This event is triggered when each header cell is rendered in the grid, and provides an object that contains information about the header cell. You can use this object to modify the styles of the header cell.
87+
To customize the appearance of the grid cell, you can use the [QueryCellInfo](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_QueryCellInfo) event of the grid. This event is triggered when each header cell is rendered in the grid, and provides an object that contains information about the header cell. You can use this object to modify the styles of the header cell.
8888

89-
The following example demonstrates how to add a `queryCellInfo` event handler to the grid. In the event handler, checked whether the current column is **Freight** field and then applied the appropriate CSS class to the cell based on its value.
89+
The following example demonstrates how to add a `QueryCellInfo` event handler to the grid. In the event handler, checked whether the current column is **Freight** field and then applied the appropriate CSS class to the cell based on its value.
9090

9191
{% tabs %}
9292
{% highlight razor tabtitle="CSHTML" %}
@@ -99,7 +99,7 @@ The following example demonstrates how to add a `queryCellInfo` event handler to
9999

100100
![Customize cell using event](../images/cell/customize-cell-using-event.png)
101101

102-
> * The [queryCellInfo](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_QueryCellInfo) event is triggered for every cell of the grid, so it may impact the performance of the grid whether used to modify a large number of cells.
102+
> * The [QueryCellInfo](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_QueryCellInfo) event is triggered for every cell of the grid, so it may impact the performance of the grid whether used to modify a large number of cells.
103103
104104
### Using CSS
105105

@@ -127,7 +127,7 @@ The following example demonstrates how to customize the appearance of a specific
127127

128128
### Using property
129129

130-
To customize the style of grid cells, define `customAttributes` property to the column definition object. The `customAttributes` property takes an object with the name-value pair to customize the CSS properties for grid cells. You can also set multiple CSS properties to the custom class using the `customAttributes` property.
130+
To customize the style of grid cells, define `CustomAttributes` property to the column definition object. The `CustomAttributes` property takes an object with the name-value pair to customize the CSS properties for grid cells. You can also set multiple CSS properties to the custom class using the `CustomAttributes` property.
131131

132132
```CSS
133133
.custom-css {
@@ -164,7 +164,7 @@ The Grid provides below methods to customize the appearance of the grid columns
164164

165165
2. **getCellFromIndex**: The `getCellFromIndex` method is used to customize the appearance of a specific cell in the grid by specifying the index of the row and column for which you want to customize the appearance.
166166

167-
The following example demonstrates how to use getColumnHeaderByIndex and getCellFromIndex methods to customize the appearance of the **CustomerID** column header and specific cell inside the [dataBound](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of the grid.
167+
The following example demonstrates how to use getColumnHeaderByIndex and getCellFromIndex methods to customize the appearance of the **CustomerID** column header and specific cell inside the [DataBound](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of the grid.
168168

169169
{% tabs %}
170170
{% highlight razor tabtitle="CSHTML" %}
@@ -189,7 +189,7 @@ There are three types of `ClipMode` available:
189189
* **Ellipsis**: Displays ellipsis when the cell content overflows its area.
190190
* **EllipsisWithTooltip**: Displays ellipsis when the cell content overflows its area, also it will display the tooltip while hover on ellipsis is applied. Also it will display the tooltip while hover on ellipsis is applied.
191191

192-
The following example demonstrates, how to set the `clipMode` property to **Clip** , **Ellipsis** and **EllipsisWithTooltip** for the **Main Fields of Invention** column, on changing the dropdown value using the [change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.DropDowns.DropDownList.html#Syncfusion_EJ2_DropDowns_DropDownList_Change) event of the `DropDownList` component. The `refresh` method is used to refresh the grid and display the updated content.
192+
The following example demonstrates, how to set the `ClipMode` property to **Clip** , **Ellipsis** and **EllipsisWithTooltip** for the **Main Fields of Invention** column, on changing the dropdown value using the [Change](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.DropDowns.DropDownList.html#Syncfusion_EJ2_DropDowns_DropDownList_Change) event of the `DropDownList` component. The `refresh` method is used to refresh the grid and display the updated content.
193193

194194
{% tabs %}
195195
{% highlight cshtml tabtitle="CSHTML" %}
@@ -203,7 +203,7 @@ The following example demonstrates, how to set the `clipMode` property to **Clip
203203
![Clip Mode](../images/cell/clip-mode.gif)
204204

205205
> * By default, `ClipMode` value is **Ellipsis**.
206-
> * If you set the [width](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Width) property of a column, the clip mode feature will be automatically applied to that column if the content exceeds the specified width.
206+
> * If you set the [Width](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Width) property of a column, the clip mode feature will be automatically applied to that column if the content exceeds the specified width.
207207
> * Be careful when using the Clip mode, as it may result in important information being cut off. It is generally recommended to use the Ellipsis or EllipsisWithTooltip modes instead.
208208
209209
## Tooltip
@@ -249,7 +249,7 @@ The Grid provides a feature to display custom tooltips for its columns using the
249249

250250
To enable custom tooltips for columns in the Grid, you can render the Grid control inside the Tooltip component and set the target as `.e-rowcell`. This will display the tooltip when hovering over the grid cells.
251251

252-
Change the tooltip content for the grid cells by using the following code in the [beforeRender](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Popups.Tooltip.html#Syncfusion_EJ2_Popups_Tooltip_BeforeRender) event.
252+
Change the tooltip content for the grid cells by using the following code in the [BeforeRender](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Popups.Tooltip.html#Syncfusion_EJ2_Popups_Tooltip_BeforeRender) event.
253253

254254
```typescript
255255
beforeRender(args): void {
@@ -261,7 +261,7 @@ Change the tooltip content for the grid cells by using the following code in the
261261

262262
```
263263

264-
The following example demonstrates how to customize the tooltip content for the grid cells by using the `beforeRender` event of the EJ2 Tooltip component.
264+
The following example demonstrates how to customize the tooltip content for the grid cells by using the `BeforeRender` event of the EJ2 Tooltip component.
265265

266266
{% tabs %}
267267
{% highlight cshtml tabtitle="CSHTML" %}

0 commit comments

Comments
 (0)