corelibraries-devexpress-dot-xpf-dot-core-dot-compatibilitysettings-46e55fc1.md
Gets or sets whether to allow infinite size of the grid-based control (for example, GridControl, TreeListControl).
Namespace : DevExpress.Xpf.Core
Assembly : DevExpress.Data.Desktop.v25.2.dll
NuGet Packages : DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
public static bool AllowInfiniteGridSize { get; set; }
Public Shared Property AllowInfiniteGridSize As Boolean
| Type | Description |
|---|---|
| Boolean |
true to allow a control to have an infinite size; otherwise, false.
|
The AllowInfiniteGridSize property specifies whether the grid can have an infinite height and/or width.
The AllowInfiniteGridSize setting is disabled.
When a grid is placed in a container without a defined size constraint, the grid throws the InfiniteGridSizeException to prevent performance issues caused by rendering all grid rows.
Limit the Grid’s HeightPlace the grid in a container (for example, Grid or DockPanel) that assigns a finite size to it.Set Height or MaxHeightExplicitly set the grid’s size or maximum allowed size (for example, Height or MaxHeight).
Enable the AllowInfiniteGridSize setting at application startup:
public partial class App : Application {
static App() {
// Allow the grid to have an infinite height (not recommended for large datasets)
DevExpress.Xpf.Core.CompatibilitySettings.AllowInfiniteGridSize = true;
}
}
Important
Be aware of the potential impact on performance when binding to large datasets.
See Also