Skip to main content
A newer version of this page is available. .

How to: Use DXGrid in Server Mode with Entity Framework 4.0+

  • 2 minutes to read

This is an example of using the GridControl in Server Mode, bound to Entity Framework 4.0+ classes. It uses the EntityServerModeSource data source. The example fetches data from the Northwind database on a local SQL Server. You can also use the corresponding demo code to generate a large data set, if currently, you don’t have a large database for testing.

<Window x:Class="DXGrid_EF4_ServerMode.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        Height="350"
        Width="525"
        Title="MainWindow">

    <dxg:GridControl AutoGenerateColumns="AddNew" Name="grid">
        <dxg:GridControl.View>
            <dxg:TableView ShowTotalSummary="True" />
        </dxg:GridControl.View>
    </dxg:GridControl>

</Window>