Back to Devexpress

GridControl Class

wpf-devexpress-dot-xpf-dot-grid-f77a7454.md

latest7.6 KB
Original Source

GridControl Class

The Data Grid control.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[DXLicenseWpf]
public class GridControl :
    GridDataControlBase,
    IAddChild,
    IDataProviderOwner,
    IDataProviderEvents,
    IDataControllerVisualClient,
    ISupportInitialize,
    IDetailElement<DataControlBase>
vb
<DXLicenseWpf>
Public Class GridControl
    Inherits GridDataControlBase
    Implements IAddChild,
               IDataProviderOwner,
               IDataProviderEvents,
               IDataControllerVisualClient,
               ISupportInitialize,
               IDetailElement(Of DataControlBase)

The following members return GridControl objects:

Remarks

Tip

Topics :

The GridControl is a data-bound control that provides a two-dimensional representation of data from a data source. The GridControl provides tabular, card, and tree (hierarchical) display formats. The GridControl supports a wide array of cell editors, full end-user customization options, advanced data binding and management, layout persistence, fixed columns, validation, UI virtualization, extended record scrolling and much more…

xaml
<dxg:GridControl AutoGenerateColumns="AddNew" 
                 EnableSmartColumnsGeneration="True" 
                 ItemsSource="{Binding Customers}">
    <dxg:GridControl.View>
        <dxg:TableView AllowPerPixelScrolling="True" ShowFixedTotalSummary="True"/>
    </dxg:GridControl.View>
</dxg:GridControl>

Refer to the following topics for information on key features:

The following code snippets (auto-collected from DevExpress Examples) contain references to the GridControl class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-bind-wpf-grid-to-data/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L8

xml
<Grid>
    <dxg:GridControl x:Name="grid">
        <dxg:GridControl.View>

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml#L20

xml
</dxb:ToolBarControl>
<dxg:GridControl x:Name="grid" Grid.Row="1">
    <dxg:GridControl.View>

wpf-bind-gridcontrol-to-dynamic-data/CS/VirtualSources.InfiniteAsyncSource/MainWindow.xaml#L15

xml
<dxg:GridControl AutoGenerateColumns="AddNew">
    <dxg:GridControl.ItemsSource>

wpf-data-grid-extend-crud-operations/CS/AsyncCRUDOperations/MainWindow.xaml#L20

xml
</dxb:ToolBarControl>
<dxg:GridControl x:Name="grid" ItemsSource="{Binding ItemsSource}" RestoreStateKeyFieldName="Id" RestoreStateOnSourceChange="True" Grid.Row="1">
    <dxmvvm:Interaction.Behaviors>

wpf-data-grid-process-frequent-data-updates/CS/ChunkAndOptSummariesExample/MainWindow.xaml#L16

xml
<Grid>
    <dxg:GridControl Name="grid" AutoGenerateColumns="None" AllowLiveDataShaping="True" OptimizeSummaryCalculation="True" ItemsSource="{Binding Devices}">
        <dxg:GridControl.TotalSummary>

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DataControlBase DevExpress.Xpf.Grid.GridDataControlBase GridControl

See Also

GridControl Members

Data Grid

Getting Started

DevExpress.Xpf.Grid Namespace