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: ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/columns/columns-mvc.md
+7-39Lines changed: 7 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ N> 1. If the column [`Field`](https://help.syncfusion.com/cr/aspnetcore-js2/Sync
22
22
23
23
## Format
24
24
25
-
To format cell values based on specific culture, use the [`Format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) property of [`Column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn.html). The TreeGrid uses [Internalization](../../common/internationalization/) library to format [`number`](../../common/internationalization/#number-formatting) and [`date`](../../common/internationalization/#manipulating-datetime)
25
+
To format cell values based on specific culture, use the [`Format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) property of [`Column`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn.html). The TreeGrid uses [Internalization](../../common/internationalization) library to format [`number`](../../common/internationalization#number-formatting) and [`date`](../../common/internationalization#manipulating-datetime)
26
26
values.
27
27
28
28
{% if page.publishingplatform == "aspnet-core" %}
@@ -47,7 +47,7 @@ values.
47
47
48
48
49
49
50
-
N> By default, the [`number`](../../common/internationalization/#number-formatting) and [`date`](../../common/internationalization/#manipulating-datetime) values are formatted in `en-US` locale.
50
+
N> By default, the [`number`](../../common/internationalization#number-formatting) and [`date`](../../common/internationalization#manipulating-datetime) values are formatted in `en-US` locale.
51
51
52
52
### Number formatting
53
53
@@ -59,13 +59,13 @@ N | Denotes numeric type. | The numeric format is followed by integer value as N
59
59
C | Denotes currency type. | The currency format is followed by integer value as C2, C3. etc which denotes the number of precision to be allowed.
60
60
P | Denotes percentage type | The percentage format expects the input value to be in the range of 0 to 1. For example the cell value `0.2` is formatted as `20%`. The percentage format is followed by integer value as P2, P3. etc which denotes the number of precision to be allowed.
61
61
62
-
Refer to the link to know more about [`Number formatting`](../../common/internationalization/#number-formatting).
62
+
Refer to the link to know more about [`Number formatting`](../../common/internationalization#number-formatting).
63
63
64
64
### Date formatting
65
65
66
66
You can format date values either using built-in date format string or custom format string.
67
67
68
-
For built-in date format you can specify [`Format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) property as string (Example: `yMd`). Refer to the link to know more about [`Date formatting`](../../common/internationalization/#manipulating-datetime).
68
+
For built-in date format you can specify [`Format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) property as string (Example: `yMd`). Refer to the link to know more about [`Date formatting`](../../common/internationalization#manipulating-datetime).
69
69
70
70
You can also use custom format string to format the date values. Some of the custom formats and the formatted date values are given in the below table.
71
71
@@ -121,8 +121,8 @@ In the below example, Duration column is locked and its reordering functionality
121
121
122
122
Column type can be specified using the [`Type`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Type.html) property in [`Column`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn.html). It specifies the type of data the column binds.
123
123
124
-
If the [`Format`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) is defined for a column, the column uses [`Type`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Type.html) to select the appropriate format option ([number](../../common/internationalization/#number-formatting)
125
-
or [date](../../common/internationalization/#manipulating-datetime)).
124
+
If the [`Format`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Format.html) is defined for a column, the column uses [`Type`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Type.html) to select the appropriate format option ([number](../../common/internationalization#number-formatting)
125
+
or [date](../../common/internationalization#manipulating-datetime)).
126
126
127
127
TreeGrid column supports the following types:
128
128
* string
@@ -134,38 +134,6 @@ TreeGrid column supports the following types:
134
134
N> If the [`Type`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~Type.html) is not defined, it will be determined from the first record of the [`DataSource`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGrid~DataSource.html).
135
135
136
136
137
-
138
-
## Checkbox column
139
-
140
-
To render checkboxes in existing column, you need to set [`ShowCheckbox`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~ShowCheckbox.html) property as **true**.
141
-
142
-
It is also possible to select the rows hierarchically using checkboxes in TreeGrid by enabling [`AutoCheckHierarchy`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.TreeGrid.TreeGrid.html#Syncfusion_EJ2_TreeGrid_TreeGrid_AutoCheckHierarchy) property. When we check on any parent record checkbox then the child record checkboxes will get checked.
143
-
144
-
{% if page.publishingplatform == "aspnet-core" %}
145
-
146
-
{% tabs %}
147
-
{% highlight cshtml tabtitle="CSHTML" %}
148
-
{% include code-snippet/tree-grid/columns-mvc/checkbox/tagHelper %}
149
-
{% endhighlight %}
150
-
{% highlight c# tabtitle="Checkbox.cs" %}
151
-
{% include code-snippet/tree-grid/columns-mvc/checkbox/checkbox.cs %}
{% include code-snippet/tree-grid/columns-mvc/checkbox/razor %}
160
-
{% endhighlight %}
161
-
{% highlight c# tabtitle="Checkbox.cs" %}
162
-
{% include code-snippet/tree-grid/columns-mvc/checkbox/checkbox.cs %}
163
-
{% endhighlight %}
164
-
{% endtabs %}
165
-
{% endif %}
166
-
167
-
168
-
169
137
## Controlling Tree Grid actions
170
138
171
139
You can enable or disable treegrid action for a particular column by setting the [`AllowFiltering`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~AllowFiltering.html), and [`AllowSorting`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn~AllowSorting.html) properties in [`Column`](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.TreeGridColumn.html).
@@ -194,7 +162,7 @@ You can enable or disable treegrid action for a particular column by setting the
194
162
195
163
## Show/hide columns by external button
196
164
197
-
You can show or hide treegrid columns dynamically using external buttons by invoking the [`showColumns`](https://ej2.syncfusion.com/documentation/api/grid/#showcolumns) or [`hideColumns`](https://ej2.syncfusion.com/documentation/api/grid/#hidecolumns) method.
165
+
You can show or hide treegrid columns dynamically using external buttons by invoking the [`showColumns`](https://ej2.syncfusion.com/documentation/api/grid#showcolumns) or [`hideColumns`](https://ej2.syncfusion.com/documentation/api/grid#hidecolumns) method.
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/tree-grid/EJ2_ASP.MVC/selection/check-box-selection.md
+62-2Lines changed: 62 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,9 +76,9 @@ In checkbox selection, selection can also be done by clicking on rows. This sele
76
76
77
77
> Checkbox Selection feature is intended for row selection only; it is not compatible with cell selection mode.
78
78
79
-
## Conditional row selection using isRowSelectable
79
+
## Conditional row selection
80
80
81
-
The TreeGrid supports conditional row selection through the [isRowSelectable](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.TreeGrid.IsRowSelectable.html) property. This feature enables dynamic business logic to determine which rows can be selected, ensuring that only rows meeting specific conditions are selectable. The `isRowSelectable` property accepts a function that evaluates each row’s data and returns **true** to enable selection or **false** to disable it. The function is executed for the entire data source before rendering, making it suitable for scenarios where selection must be restricted based on criteria.
81
+
The TreeGrid supports conditional row selection through the `isRowSelectable` property. This feature enables dynamic business logic to determine which rows can be selected, ensuring that only rows meeting specific conditions are selectable. The `isRowSelectable` property accepts a function that evaluates each row’s data and returns **true** to enable selection or **false** to disable it. The function is executed for the entire data source before rendering, making it suitable for scenarios where selection must be restricted based on criteria.
82
82
83
83
{% if page.publishingplatform == "aspnet-core" %}
84
84
@@ -103,4 +103,64 @@ The TreeGrid supports conditional row selection through the [isRowSelectable](ht
103
103
{% endtabs %}
104
104
{% endif %}
105
105
106
+
In this sample, checkbox selection is disabled for rows where the "Progress" column has the value **"Completed"**.
107
+
108
+
## Checkbox Selection In Tree Column
109
+
110
+
1.### Enable checkboxes in tree column
111
+
112
+
To render checkboxes in tree column, you need to set [`ShowCheckbox`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.TreeGrid.TreeGridColumn.html#Syncfusion_EJ2_TreeGrid_TreeGridColumn_ShowCheckbox) property as **true**.
113
+
114
+
It is possible to select rows hierarchically using checkboxes in TreeGrid by enabling the [`AutoCheckHierarchy`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.TreeGrid.TreeGrid.html#Syncfusion_EJ2_TreeGrid_TreeGrid_AutoCheckHierarchy) property. When a parent record’s checkbox is checked, the checkboxes of its child records are automatically selected and vice-versa.
115
+
116
+
{% if page.publishingplatform == "aspnet-core" %}
117
+
118
+
{% tabs %}
119
+
{% highlight cshtml tabtitle="CSHTML" %}
120
+
{% include code-snippet/tree-grid/columns-mvc/checkbox/tagHelper %}
121
+
{% endhighlight %}
122
+
{% highlight c# tabtitle="Checkbox.cs" %}
123
+
{% include code-snippet/tree-grid/columns-mvc/checkbox/checkbox.cs %}
{% include code-snippet/tree-grid/columns-mvc/checkbox/razor %}
132
+
{% endhighlight %}
133
+
{% highlight c# tabtitle="Checkbox.cs" %}
134
+
{% include code-snippet/tree-grid/columns-mvc/checkbox/checkbox.cs %}
135
+
{% endhighlight %}
136
+
{% endtabs %}
137
+
{% endif %}
138
+
139
+
2.### Checkbox selection in tree column with virtualization
140
+
141
+
The TreeGrid component is designed to handle large datasets while providing flexible checkbox selection with virtualization enabled. The [`ShowCheckbox`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.TreeGrid.TreeGridColumn.html#Syncfusion_EJ2_TreeGrid_TreeGridColumn_ShowCheckbox) property displays checkboxes in tree column cells, allowing users to select or deselect them directly. This functionality is enabled by setting the property to "**true**". Similarly, the [`EnableVirtualization`](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.TreeGrid.TreeGrid.html#Syncfusion_EJ2_TreeGrid_TreeGrid_EnableVirtualization) property enhances performance by rendering only the visible rows and columns during scrolling. This feature is activated by setting the property to "**true**".
142
+
143
+
{% if page.publishingplatform == "aspnet-core" %}
144
+
145
+
{% tabs %}
146
+
{% highlight cshtml tabtitle="CSHTML" %}
147
+
{% include code-snippet/tree-grid/selection/showCheckbox-Virtualization/tagHelper %}
148
+
{% endhighlight %}
149
+
{% highlight c# tabtitle="Partial.cs" %}
150
+
{% include code-snippet/tree-grid/selection/showCheckbox-Virtualization/groceriesData.cs %}
{% include code-snippet/tree-grid/selection/showCheckbox-Virtualization/razor %}
159
+
{% endhighlight %}
160
+
{% highlight c# tabtitle="Partial.cs" %}
161
+
{% include code-snippet/tree-grid/selection/showCheckbox-Virtualization/groceriesData.cs%}
162
+
{% endhighlight %}
163
+
{% endtabs %}
164
+
{% endif %}
165
+
106
166
N> You can refer to our [`ASP.NET MVC Tree Grid`](https://www.syncfusion.com/aspnet-mvc-ui-controls/tree-grid) feature tour page for its groundbreaking feature representations. You can also explore our [`ASP.NET MVC Tree Grid example`](https://ej2.syncfusion.com/aspnetmvc/TreeGrid/Overview#/material) to knows how to present and manipulate data.
0 commit comments