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/resize.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,18 +33,21 @@ Here a few notes on the resizing behavior:
33
33
34
34
## Autofit Columns
35
35
36
-
When column resizing is enabled, a double click on the resize handle between the header cells will automatically fit the column width to the content of the header, data and footers. This will remove text wrapping in the component.
36
+
When column resizing is enabled, a double click on the resize handle between two header cells automatically adjusts the column width to the content of the header, data and footers. Autofitting also removes text wrapping in the column cells.
37
37
38
-
The Grid also exposes methods to programmatically resize columns to fit their contents:
38
+
Similar to regular [column resizing](#resize-by-dragging), autofitting specific columns preserves the current widths of all the other columns. Column autofitting can trigger a horizontal Grid scrollbar or leave empty space after the last column.
39
39
40
-
*`AutoFitColumnAsync(string id)`—Autofits the column with the specified [`Id` attribute](slug:components/grid/columns/bound#identification).
40
+
The Grid takes into account the `MinResizableWidth` and `MaxResizableWidth` for each auto-fitted column.
41
+
42
+
The component also exposes methods to programmatically resize columns to fit their contents:
43
+
44
+
*`AutoFitColumnAsync(string id)`—Autofits the column with the specified [`Id` attribute](slug:components/treelist/columns/bound#identification).
41
45
*`AutoFitColumnsAsync(IEnumerable<string> ids)`—Autofits multiple columns at once.
42
46
*`AutoFitAllColumnsAsync()`—Autofits all applicable columns. For example, this method does not affect the hierarchy expand/collapse columns.
43
47
44
-
Autofitting specific columns preserves the current widths of all the other columns. Similar to [column resizing](#resize-by-dragging), column autofitting can trigger a horizontal Grid scrollbar, or leave empty space after the last column.
45
-
46
48
Programmatic autofitting works even if column resizing is disabled.
47
49
50
+
> Autofitting a large number of columns with a large `PageSize` can be a resource-intensive operation. For better client-side performance, set fixed optimal widths to all columns with predictable content like numbers and dates, and only autofit the others.
48
51
49
52
### Limitations
50
53
@@ -56,7 +59,6 @@ The known limitations of the Autofit Columns feature include:
56
59
57
60
>important Trying to autofit the columns on initial load will throw a `NullReferenceException`. Check the [AutoFit all Grid columns on initial load knowledge-based article](slug:grid-autofit-columns-on-initial-load) to see a possible solution to achieve this behavior.
58
61
59
-
60
62
## Example
61
63
62
64
>caption How Column Resizing Works in the Telerik Grid
Copy file name to clipboardExpand all lines: components/treelist/columns/bound.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,11 @@ You can use the following properties on bound columns:
140
140
*`ShowColumnMenu` - (defaults to `true`) - if set to `false`, disables the [column menu](slug:treelist-column-menu) for that particular column.
141
141
*`VisibleInColumnChooser` - (defaults to `true`) - if set to `false`, removes the column from the Column chooser of the [column menu](slug:treelist-column-menu).
142
142
143
+
### Identification
144
+
145
+
*`Id` - a unique identifier of the TreeList Column. Use to associate the column to the respective item in the column chooser when the columns are organized in [sections](slug:treelist-column-menu#column-sections).
146
+
*`ref` - the standard Blazor reference name.
147
+
143
148
### Data Operations
144
149
145
150
*`Editable` - (defaults to `true`) - you can set this property to `true` or `false` to allow or prevent [editing](slug:treelist-overview#editing) of this field. Defaults to `true`. To edit data, you also need a [CommandColumn](slug:treelist-columns-command).
Copy file name to clipboardExpand all lines: components/treelist/columns/resize.md
+42-43Lines changed: 42 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,37 +33,47 @@ Here a few notes on the resizing behavior:
33
33
34
34
## Autofit Columns
35
35
36
-
When column resizing is enabled, a double click on the resize handle between the header cells will automatically fit the column width to the content of the header, data and footers. This will remove text wrapping in the component.
36
+
When column resizing is enabled, a double click on the resize handle between two header cells automatically adjusts the column width to the content of the header, data and footers. Autofitting also removes text wrapping in the column cells.
37
37
38
-
The TreeList also exposes methods to programmatically resize columns to fit their contents:
38
+
Similar to regular [column resizing](#resize-by-dragging), autofitting specific columns preserves the current widths of all the other columns. Column autofitting can trigger a horizontal TreeList scrollbar, or leave empty space after the last column.
39
39
40
-
*`AutoFitColumn(string id)` - autofits the column with the specified `Id` attribute;
41
-
*`AutoFitColumns(IEnumerable<string> ids)` - autofits multiple columns at once;
42
-
*`AutoFitAllColumns()` - autofits all applicable columns (for example, this method does not affect the hierarchy expand/collapse column);
40
+
The TreeList takes into account the `MinResizableWidth` and `MaxResizableWidth` of each auto-fitted column.
43
41
44
-
Autofitting specific columns preserves the current widths of all the other columns. Similar to [column resizing](#resize-by-dragging), column autofitting can trigger a horizontal Grid scrollbar, or leave empty space after the last column.
42
+
The component also exposes methods to programmatically resize columns to fit their contents:
43
+
44
+
*`AutoFitColumnAsync(string id)`—Autofits the column with the specified [`Id` attribute](slug:components/grid/columns/bound#identification).
45
+
*`AutoFitColumnsAsync(IEnumerable<string> ids)`—Autofits multiple columns at once.
46
+
*`AutoFitAllColumnsAsync()`—Autofits all applicable columns. For example, this method does not affect the hierarchy expand/collapse columns.
45
47
46
48
Programmatic autofitting works even if column resizing is disabled.
47
49
50
+
> Autofitting a large number of columns with a large `PageSize` can be a resource-intensive operation. For better client-side performance, set fixed optimal widths to all columns with predictable content like numbers and dates, and only autofit the others.
51
+
52
+
### Limitations
53
+
54
+
The known limitations of the Autofit Columns feature include:
55
+
56
+
* Autofitting the columns is not supported with [Virtual Columns](slug:treelist-columns-virtual).
57
+
58
+
* Autofitting the columns on initial load of the TreeList is not supported.
59
+
60
+
>important Trying to autofit the columns on initial load will throw a `NullReferenceException`. Check the [AutoFit all Grid columns on initial load knowledge-base article](slug:grid-autofit-columns-on-initial-load) to see a possible solution to achieve this behavior.
61
+
48
62
## Example
49
63
50
64
>caption How column resizing works in the Telerik TreeList
0 commit comments