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: skills/igniteui-angular-grids/references/sizing.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
The grid uses **border-box sizing** — border and padding are included in the width/height calculations. Do **not** override `box-sizing` on the grid element; doing so will break size calculations.
19
19
20
-
Do **not** set `width` or `height` via CSS styles directly on the grid host element — always use the `width` and `height`**inputs** on the grid component.
20
+
The grid supports both component inputs (`width`/`height`) and regular CSS/layout sizing from the host or wrapping container (including flex/grid layouts). Use the inputs when you need explicit grid sizing behavior such as `null` sizing that disables virtualization.
21
21
22
22
## Grid Width
23
23
@@ -34,6 +34,7 @@ Do **not** set `width` or `height` via CSS styles directly on the grid host elem
34
34
- All columns are rendered in the DOM — **column virtualization is disabled**.
35
35
- Grid width expands to fit all column widths (minimum `136px` per column when no column widths are set).
36
36
- No horizontal scrollbar inside the grid; the browser may render a native scrollbar if content overflows the viewport.
37
+
- This is an edge-case mode intended when disabling column virtualization is desired; in layout-constrained containers (for example flex/grid wrappers), the expanding content width can break expected responsive sizing.
37
38
-**Warning:** large column counts with `null` width can significantly impact browser performance due to no virtualization.
38
39
39
40
### Pixel Width
@@ -210,7 +211,7 @@ igx-grid {
210
211
211
212
## Key Rules
212
213
213
-
-**Never** set `width` or `height` directly as CSS styles on the grid host element — use the component `[width]` and `[height]` inputs.
214
+
-Grid sizing can come from CSS/layout context (host/container sizing) or from `[width]`/`[height]` inputs. Use `null` width/height only intentionally, because it disables virtualization.
214
215
-**Never** override `box-sizing` on the grid — it uses border-box and relies on this.
215
216
- Use `null` for width/height only when the data set is small; virtualization is disabled and large data will hurt performance.
216
217
- When using percentage height, the parent **must** have an explicit height for the percentage to resolve correctly. Without it, the grid falls back to 10 visible rows.
0 commit comments