Skip to content

Commit 2b738bf

Browse files
chore(grid): explanations on width dimensions
1 parent e2401ff commit 2b738bf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

components/grid/columns/width.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ position: 4
1212

1313
This article explains how the grid column width behaves depending on the settings applied by the developer.
1414

15+
You can set the grid column `Width` parameter in any CSS unit, such as `px`, `%`, `vw`, `em`, `rem`. You can read more on how to set sizes in Telerik components in the [Dimensions]({%slug common-features/dimensions%}) article. You must, however, provide the unit so that the browser can understand it.
16+
1517
With regard to the widths of its columns, the scrollable (default) Grid typically behaves as any regular HTML table with a `table-layout: fixed`.
1618

1719
* When all column widths are explicitly set and the cumulative column width is greater than the available Grid width, a horizontal scrollbar appears and all set column widths are respected.
20+
1821
* When all column widths are explicitly set and the cumulative column width is less than the available Grid width, the remaining width is distributed evenly between all columns.
22+
1923
* When only some column widths are set and the cumulative width of the columns with set widths is greater than the available Grid width, a horizontal scrollbar appears and all set column widths are respected. Columns with no set width are invisible as their width is `0`.
24+
2025
* When only some column widths are set and the cumulative width of columns with set widths is less than the available Grid width, the widths of the columns with a set width are respected and the remaining width is distributed evenly between the other columns.
26+
2127
* When no column widths are set, the available width is distributed evenly between all Grid columns.
2228

2329
# See Also

components/grid/export/excel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ The Excel export has the following specifics:
9999

100100
* Only columns that have a `Field` set are exported.
101101

102+
* Excel does not understand units different than `px` for the column `Width`, and if you use them (such as `rem` or `%`), it will fail to parse them and will render a collapsed (hidden) column with zero width.
103+
102104
* If you are using the `OnRead` event, only the current page of data will be exported, because that's all the grid has at the time of the export action.
103105

104106
* With Server-side Blazor, the file may become larger than the default SignalR connection limit, and this can disconnect the client and result in an error. Generally, this requires quite a lot of data to happen, but you may need to increase the size limit of the connection in the `ConfigureServices` method of your `Startup.cs` file, for example:

0 commit comments

Comments
 (0)