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/virtual.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Virtual
2
+
title: Virtualized
3
3
page_title: Grid for Blazor | Virtual Columns
4
4
description: How to add virtual columns to a scrollable Grid.
5
5
slug: grid-columns-frozen
@@ -10,13 +10,14 @@ position: 5
10
10
11
11
# Virtual Columns
12
12
13
-
The Grid lets you add Virtual Columns. This means that columns will be rendered only for the currently visible viewport and data will be loaded just for them.
13
+
The Grid lets you add Virtualized Columns. This means that columns and the corresponding data will be rendered only for the currently visible viewport. When changing the [Page]({%slug components/grid/features/paging%}) or [Sorting]({%slug components/grid/features/sorting%}) the Grid less elements are rendered which improves the responsiveness and the overall user experience.
14
14
15
15
## Requirements
16
-
To enable Virtual Columns:
16
+
To enable Virtualized Columns:
17
17
* Set the `ColumnVirtualization` parameter of the Grid to `true`.
18
18
* Set the `Width` parameter of all columns in `px` so that the total sum is greater than the `Width` of the Grid which will enable horizontal scrollbar. You can read more about the scrolling behavior of the grid in the [Grid Column Width Behavior]({%slug grid-columns-width%}) article.
19
-
* Set the `RowHeight` parameter so that the content fits. For more information see the [Notes](#notes) section.
19
+
* Set the `RowHeight` so that the content of all cells fit in the row. For more information see the [Notes](#notes) section.
20
+
* Set the `Height` of the Grid in `px`. For more information see the [Notes](#notes) section.
20
21
21
22
22
23
This article will be separated in the following sections:
@@ -32,12 +33,12 @@ The targeted scenario is for Grid with big volume of columns, since the performa
32
33
33
34
>caption Basic setup of the Virtual Columns
34
35
35
-
36
36
````CSHTML
37
37
@*Observe the behavior of the Grid with enabled ColumnVirtualization*@
38
38
39
39
<TelerikGrid Data="@MyData"
40
40
Width="800px"
41
+
Height="400px"
41
42
RowHeight="65"
42
43
ColumnVirtualization="true"
43
44
Pageable="true" PageSize="5">
@@ -113,9 +114,9 @@ The targeted scenario is for Grid with big volume of columns, since the performa
113
114
114
115
## Virtual Columns and Rows
115
116
116
-
To use Virual Columns and Rows together you need to set `Height` parameter of the Grid. More information on Virtual Rows can be found in the [Virtual Scrolling]({%slug components/grid/virtual-scrolling%}) article.
117
+
To use Virtualized Columns and Rows together you need to set `Height` parameter of the Grid as well. More information on Virtual Rows can be found in the [Virtual Scrolling]({%slug components/grid/virtual-scrolling%}) article.
117
118
118
-
>caption Use Virtual Columns and Rows together
119
+
>caption Use Virtualized Columns and Rows together
119
120
120
121
````CSHTML
121
122
@*Observe the behavior of the Grid with Virtual Rows and Columns*@
@@ -199,7 +200,7 @@ To use Virual Columns and Rows together you need to set `Height` parameter of th
199
200
200
201
## Virtual Autogenerated Columns
201
202
202
-
In order to add Virtual Autogenerated Columns, the `ColumnWidth` parameter must be set. For more information on Autogenerated columns you can read the [Automatically Generated Columns]({%slug grid-columns-automatically-generated%}) article.
203
+
In order to add Virtualized Autogenerated Columns, the `ColumnWidth` parameter must be set. For more information on Autogenerated columns you can read the [Automatically Generated Columns]({%slug grid-columns-automatically-generated%}) article.
203
204
204
205
````CSHTML
205
206
@*Grid with Virtual Autogenerated Columns*@
@@ -292,10 +293,11 @@ In order to add Virtual Autogenerated Columns, the `ColumnWidth` parameter must
292
293

293
294
294
295
## Notes
295
-
* Rendering the Virtual Columns in Client-side Blazor Applications is slower due to the Framework rendering performance. In the Server-side Applications this issue is not present.
296
-
* Setting `RowHeight` and `Height` is required because the grid could be dynamically resized during scrolling due to the way HTML handles with dynamic content.
296
+
* Rendering the Virtual Columns in Client-side Blazor Applications is slower due to the Framework rendering limitations. In the Server-side Applications this issue is not present.
297
+
* The `RowHeight` must accommodate the height of all the possible cells and their content in order to ensure good appearance. If certain cells that are not rendered have content that is taller than the rendered ones, you may experience glitches and unstable scrolling. If the row/cell height the browser would render is larger than the `RowHeight` value, the browser will ignore it. It can depend on the chosen Theme or other CSS rules, or on cell data that falls on more than one row. Inspect the rendered HTML to make sure the grid setting matches the rendering.
298
+
* The `Height` of the Grid must be explicitly set in `px`. By default the Height is calculated. When a new row is rendered during horizontal scrolling it might increase the horizonal size of the Grid and cause issues with the rendering and abnormal visual behavior for the users.
0 commit comments