Best DataGrid for WPF? Built-In vs. Xceed Compared

The built-in WPF DataGrid handles the basics — sorting, binding, simple editing. But once you need master-detail, async virtualization, Excel export, or modern theming, you hit its limits fast. This article compares it to Xceed DataGrid for WPF with working code examples, a feature table, and practical gotchas from real usage.

Best DataGrid for WPF? Built-In vs. Xceed Compared

Let’s be honest for a second. If you’ve ever tried to build anything serious with the built-in DataGrid in WPF, you know the feeling. It works fine for a quick prototype, maybe a small internal tool. But the moment a client says “can we add grouping?” or “we need to export this to Excel” — that’s when things start to unravel.

I’ve been there. You probably have too. So let’s talk about what a WPF DataGrid actually needs to do in a real application, where the built-in control falls short, and what the alternatives look like.

What does a WPF DataGrid even need to do?

It sounds like a simple question, right? Display rows and columns. But think about what users actually expect from a WPF grid these days:

They want to click a column header and have it sort. Dragging columns around should just work. On top of that, they expect filtering, grouping by category, maybe even expanding a row to see related data underneath. It shouldn’t freeze when you load 50,000 rows. And honestly? It needs to look like it belongs in a modern Windows app, not something from 2008.

The built-in System.Windows.Controls.DataGrid handles some of this. Basic sorting works. You can bind to a collection. But that’s kind of where the good news ends.

Where the built-in WPF DataGrid falls short

I don’t want to bash the built-in control too hard — it’s fine for what it is. However, here’s what you’ll run into pretty quickly:

  • Performance degrades with large data. Try loading a few tens of thousands of rows without proper virtualization. The UI locks up, scrolling gets choppy, and your users start wondering if the app crashed. The built-in grid has some virtualization, but it’s basic — no async loading from remote sources, no preemptive caching. If your data lives in a database, you’re on your own.
  • Master-detail doesn’t exist. Need to show orders with their line items? Departments with employees? The built-in grid doesn’t support this at all. You’ll end up building a custom solution with nested grids (which is… not fun) or reaching for a third-party control.
  • Grouping is limited. You can technically group, but multi-level grouping with summaries? Custom group headers? That’s a lot of manual work for something that should be straightforward.
  • Theming feels stuck in 2010. The default look is dated. Getting it to match Windows 10/11 aesthetics takes a surprising amount of XAML customization. And if your designer asks for Material Design — good luck.
  • No export, no printing. There’s no Excel export, no CSV, and no built-in print support. As a result, you need to build it yourself or bolt on another library.

Does any of this sound familiar?

Why most end up using Xceed DataGrid for WPF

I’ll be upfront — there are several third-party DataGrid WPF options out there. I’ve tried a few over the years. The one that stuck for users is our Xceed DataGrid for WPF.

Why? Partly because it’s been around for 13+ years and has something like 185 features (their claim, not mine). More importantly, when I dropped it into a project, things just worked without a lot of fussing. Your mileage may vary, but that’s been my experience.

Let me walk through the features with actual working code so you can judge for yourself.

Getting started with the Xceed WPF DataGrid

First, grab the NuGet package:

Install-Package Xceed.Products.Wpf.DataGrid.Full

Then set up your license key in App.xaml.cs (you get a trial key when you download, or a permanent one with a license):

protected override void OnStartup(StartupEventArgs e)
{
    Xceed.Wpf.DataGrid.Licenser.LicenseKey = "YOUR-LICENSE-KEY";
    base.OnStartup(e);
}

And that’s pretty much it for setup. (Xceed has a more detailed getting started walkthrough if you want the full picture.) Add the namespace to your XAML and you’re off:

<Window xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">

    <xcdg:DataGridControl ItemsSource="{Binding Products}">
        <xcdg:DataGridControl.Columns>
            <xcdg:Column FieldName="Name" Title="Product Name" />
            <xcdg:Column FieldName="Price" Title="Price" />
            <xcdg:Column FieldName="Category" Title="Category" />
            <xcdg:Column FieldName="InStock" Title="In Stock" />
        </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>

</Window>

That gives you a fully functional DataGrid in WPF — sorting, filtering, editing, all built in. No extra configuration needed for the basics.

The Tableflow view for a modern WPF grid

The default table view is fine, but Xceed has this thing called Tableflow that’s honestly hard to go back from once you’ve used it. It’s an animated table view with smooth inertial scrolling, sticky group headers, and column reordering via drag-and-drop.

Switching to it is one property:

<xcdg:DataGridControl ItemsSource="{Binding Employees}">
    <xcdg:DataGridControl.View>
        <xcdg:TableflowView AllowColumnChooser="True"
                            IsAlternatingRowStyleEnabled="True" />
    </xcdg:DataGridControl.View>
</xcdg:DataGridControl>

The AllowColumnChooser property adds a little button that lets users pick which columns they want to see. IsAlternatingRowStyleEnabled does what you’d expect — alternating row colors for readability. Small things, but they make a difference.

There are other views too — TableView (the classic flat grid), TreeGridflow for hierarchical tree data, and even a 3D card view if you’re feeling adventurous. I mostly stick with Tableflow though.

DataGrid grouping in WPF that actually works

This is one of those things where the built-in WPF DataGrid technically supports grouping but makes you do way too much work for anything beyond the basics. With Xceed, you use their DataGridCollectionView and it just… works:

var collectionView = new DataGridCollectionView(employees);
collectionView.GroupDescriptions.Add(
    new DataGridGroupDescription("Department"));

groupingGrid.ItemsSource = collectionView;

That gives you employees grouped by department, with collapsible group headers. If you want multi-level grouping, just add another DataGridGroupDescription. Likewise, if you need summaries (count, sum, average) in the group headers, Xceed supports that too. There’s a deeper tutorial on grouping and sorting if you want to see more examples.

The XAML side stays clean:

<xcdg:DataGridControl x:Name="groupingGrid">
    <xcdg:DataGridControl.View>
        <xcdg:TableflowView IsAlternatingRowStyleEnabled="True" />
    </xcdg:DataGridControl.View>
</xcdg:DataGridControl>

Filtering your WPF DataGrid (Excel-style)

One thing that always bugged me about the built-in control is how much work you have to do to get decent filtering. Xceed has auto-filtering built in — those Excel-style dropdown filters in the column headers. You enable it on the DataGridCollectionViewSource:

<Window.Resources>
    <xcdg:DataGridCollectionViewSource x:Key="cvs_products"
                                       Source="{Binding Products}"
                                       AutoFilterMode="And" />
</Window.Resources>

<xcdg:DataGridControl ItemsSource="{Binding Source={StaticResource cvs_products}}">
    <xcdg:DataGridControl.View>
        <xcdg:TableflowView />
    </xcdg:DataGridControl.View>
</xcdg:DataGridControl>

Set AutoFilterMode to "And" (all filter criteria must match) or "Or" (any criterion matches), and you get filter dropdowns on every column automatically. You can also turn it off for specific columns with AllowAutoFilter="False" if some columns don’t make sense to filter on. The filtering tutorial covers advanced scenarios like custom distinct values and combining filter approaches.

Master-detail in the WPF DataGrid (the tricky one)

Okay, I’ll admit this one took me a bit to figure out. Master-detail in Xceed works best when you feed it a DataSet with DataRelation objects — think of it like defining a foreign key relationship that the grid can understand and expand.

Here’s the setup on the C# side. It’s a bit more code than the other examples, but bear with me:

var dataSet = new DataSet();

// Master table: Orders
var ordersTable = new DataTable("Orders");
ordersTable.Columns.Add("OrderId", typeof(int));
ordersTable.Columns.Add("Customer", typeof(string));
ordersTable.Columns.Add("OrderDate", typeof(DateTime));
ordersTable.Columns.Add("Total", typeof(decimal));
ordersTable.PrimaryKey = new[] { ordersTable.Columns["OrderId"]! };

// Detail table: OrderDetails
var detailsTable = new DataTable("OrderDetails");
detailsTable.Columns.Add("DetailId", typeof(int));
detailsTable.Columns.Add("OrderId", typeof(int));
detailsTable.Columns.Add("Product", typeof(string));
detailsTable.Columns.Add("Quantity", typeof(int));
detailsTable.Columns.Add("UnitPrice", typeof(decimal));

dataSet.Tables.Add(ordersTable);
dataSet.Tables.Add(detailsTable);

// This is the key part — the DataRelation
dataSet.Relations.Add("OrderDetails",
    ordersTable.Columns["OrderId"]!,
    detailsTable.Columns["OrderId"]!);

The important thing here is that the DataRelation name ("OrderDetails") needs to match what you put in your XAML’s DetailConfiguration. Then you wrap it in a DataGridCollectionView:

var collectionView = new DataGridCollectionView(ordersTable.DefaultView);
masterDetailGrid.ItemsSource = collectionView;

And the XAML:

<xcdg:DataGridControl x:Name="masterDetailGrid"
                      AutoCreateDetailConfigurations="True"
                      ReadOnly="True">
    <xcdg:DataGridControl.View>
        <xcdg:TableflowView />
    </xcdg:DataGridControl.View>
    <xcdg:DataGridControl.DetailConfigurations>
        <xcdg:DetailConfiguration RelationName="OrderDetails"
                                  Title="Order Details">
            <xcdg:DetailConfiguration.Columns>
                <xcdg:Column FieldName="OrderId" Visible="False" />
                <xcdg:Column FieldName="DetailId" Visible="False" />
            </xcdg:DetailConfiguration.Columns>
        </xcdg:DetailConfiguration>
    </xcdg:DataGridControl.DetailConfigurations>
</xcdg:DataGridControl>

A couple of gotchas I ran into: AutoCreateDetailConfigurations defaults to false, so you have to set it to True or you’ll get no expand buttons and wonder what went wrong. And the RelationName on the DetailConfiguration has to match the DataRelation name exactly — it’s case-sensitive.

Once it’s working though, it’s really nice. Essentially, each order row gets an expand arrow — click it, and you see the line items inline. One scrollbar for the whole thing, no nested grid nonsense. The master-detail documentation has additional examples if you need deeper hierarchies.

MVVM support and data binding

If you’re doing WPF development, chances are you’re using MVVM — and you’re probably wondering if Xceed’s grid plays nice with it. Short answer: yes, it does.

The grid binds to ItemsSource just like any other WPF control, so your standard ObservableCollection<T> and INotifyPropertyChanged patterns work as expected. Here’s a typical ViewModel setup:

public class ProductViewModel : INotifyPropertyChanged
{
    public ObservableCollection<Product> Products { get; }

    public ProductViewModel()
    {
        Products = new ObservableCollection<Product>(
            LoadProductsFromDatabase());
    }

    public event PropertyChangedEventHandler? PropertyChanged;
}
<xcdg:DataGridControl ItemsSource="{Binding Products}" />

Nothing unusual there. The grid picks up collection changes automatically — add or remove items from the ObservableCollection and the UI updates. Similarly, property changes on individual items propagate through INotifyPropertyChanged as you’d expect.

In addition, the DataGridCollectionView and DataGridCollectionViewSource follow the same patterns as WPF’s built-in CollectionView / CollectionViewSource, so if you’re already familiar with those, you’ll feel right at home.

Xceed also exposes dependency properties like SelectedItemsSource and CurrentItem for two-way binding — the MVVM documentation covers this in detail.

Theming and appearance

Xceed ships with 18 themes. I’ve mostly been using the Windows 10 one because it fits naturally on modern Windows, but there’s also Aero, Windows 7, Windows 8, Zune (yes, Zune), Office 2007/2010 styles, and more.

Applying a theme in XAML:

<xcdg:DataGridControl ItemsSource="{Binding Products}">
    <xcdg:DataGridControl.View>
        <xcdg:TableflowView IsAlternatingRowStyleEnabled="True">
            <xcdg:TableflowView.Theme>
                <tp5:Windows10Theme />
            </xcdg:TableflowView.Theme>
        </xcdg:TableflowView>
    </xcdg:DataGridControl.View>
</xcdg:DataGridControl>

(You’ll need the namespace for the theme pack: xmlns:tp5="clr-namespace:Xceed.Wpf.DataGrid.ThemePack;assembly=Xceed.Wpf.DataGrid.ThemePack.5")

You can also switch themes at runtime in code-behind, which is handy if you want to let users pick their preferred look. Each theme is a separate assembly, so you only load the ones you actually use. Xceed also has a Pro Themes package that styles all standard WPF controls to match, not just the grid.

Performance and virtualization

I haven’t talked about this enough yet, and it’s probably the single most important reason to look beyond the built-in WPF grid control. Xceed DataGrid has full UI virtualization (only visible rows get rendered), column virtualization (matters when you have wide grids), and — this is the big one — async data virtualization.

In practice, that means the grid can fetch data from a remote source in the background, cache it, and preemptively load nearby pages. As a result, your UI never freezes. The grid handles datasets with millions of rows, which is something the built-in WPF DataGrid simply can’t do without a lot of custom plumbing.

If you’re building anything that talks to a database or an API — honestly, any data source bigger than what fits comfortably in memory — this is the feature that matters most. There’s a practical walkthrough on rendering 1 million rows without freezing the UI if you want to see the details.

What else is in the box?

Beyond the features above, there are some things I haven’t covered in detail but are still worth mentioning:

  • Editing. The grid auto-selects editors based on data type — text boxes for strings, date pickers for dates, checkboxes for booleans, numeric editors for numbers. It supports IDataErrorInfo and INotifyDataErrorInfo for validation. Masked input (phone numbers, SSNs) is built in too.
  • Export. Excel (XLSX), CSV, and clipboard copy are all included. No extra NuGet packages, no third-party libraries. Same goes for print preview and printing.
  • .NET support. Works on .NET Framework 4.0+, .NET Core 3.0+, and all the way up to .NET 8. Whether you’re maintaining a legacy app or starting fresh, it’s compatible.

Built-in WPF DataGrid vs. Xceed: feature comparison

Here’s the side-by-side, since I know that’s what a lot of people are looking for:

FeatureBuilt-in WPF DataGridXceed DataGrid for WPF
UI VirtualizationBasicFull (including grouped data)
Async Data VirtualizationNoYes
Smooth ScrollingNoYes (inertial)
Master-DetailNoYes (single scrollbar)
Multi-Level GroupingLimitedFull with summaries
Auto-FilteringNoYes (Excel-style)
Built-in Themes118
Excel ExportNoYes (XLSX + CSV)
PrintingNoYes
3D ViewsNoYes
Rich EditorsBasicFull suite
.NET 8 SupportYesYes

Pricing and licensing

Since people always ask — Xceed DataGrid for WPF is a commercial product. It’s not free, and it’s not open source. You can request a free 45-day trial to evaluate it, and licenses are per-developer (no runtime royalties). Pricing varies depending on whether you want just the DataGrid or the full Business Suite. Check the pricing page for current numbers.

If you’re looking for something free, the built-in DataGrid is obviously zero cost, and there are some open-source options on GitHub — though in my experience they tend to be much more limited in features and polish.

Choosing the right DataGrid for WPF

Look, the built-in DataGrid in WPF is not a bad control. For simple stuff, it gets the job done. On the other hand, if you’re building something that real users depend on — something with big datasets, hierarchical data, grouping, export needs, or just a look that doesn’t feel a decade old — you’re going to hit its limits fast.

Xceed DataGrid for WPF has been my go-to for these situations. Is it the only third-party grid out there? No. But the combination of Tableflow, master-detail, async virtualization, and the fact that it just works on .NET 8 without surprises — that’s why I keep reaching for it.

If you’re wrestling with the built-in grid or evaluating your options, it’s worth giving it a try. The NuGet package gets you up and running in about five minutes, and there are 28 sample applications covering pretty much every feature if you want to explore further.

Ready to try Xceed DataGrid for WPF?

Download the full-featured DataGrid and try it free for 45 days, no commitment.

Get it now – 45-day free trial
Install via NuGet

Frequently asked questions

Is there a free DataGrid for WPF?

Yes — WPF ships with a built-in System.Windows.Controls.DataGrid that’s completely free. It covers basic sorting, column binding, and simple editing. However, for anything more advanced (master-detail, async virtualization, Excel export, theming), you’ll likely need a commercial WPF DataGrid component like Xceed.

How do I improve WPF DataGrid performance with large datasets?

The built-in grid supports basic UI virtualization. However, for truly large datasets you need async data virtualization — loading data on demand from the source without freezing the UI. Xceed DataGrid for WPF is the only WPF grid that supports this natively. You can also improve performance by enabling column virtualization and using a TableflowView or TableView instead of card-based views.

Does the WPF DataGrid support MVVM?

The built-in DataGrid works with MVVM through standard ItemsSource binding, ObservableCollection<T>, and INotifyPropertyChanged. Third-party grids like Xceed follow the same patterns — you bind to ItemsSource, and collection and property changes propagate automatically. Xceed’s DataGridCollectionViewSource also works as a XAML resource, similar to WPF’s built-in CollectionViewSource.

Can I export a WPF DataGrid to Excel?

Not with the built-in control — there’s no export functionality included. In contrast, Xceed DataGrid for WPF has built-in Excel (XLSX) and CSV export, plus clipboard copy support and print/print preview. No additional libraries needed.





PDF Library for .Net is now out! Bundle it with Words for .Net for only 100$ for a limited time at checkout