devexpress/agent-skills/devexpress-wpf-data-grid

Claude Code and agent skill by devexpress/agent-skills

Trust tier 2
  • community
  • ext:[{"type":"template","description":"Custom templates for code generation"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Build WPF applications with the DevExpress Data Grid (GridControl) — a data-aware control that displays and edits data in table, card, and treelist layouts. Use when adding GridControl to a WPF project, configuring columns and editors, sorting, filtering, grouping, summaries, master-detail, conditional formatting, printing, and exporting (XLSX/CSV/PDF). Also use when someone mentions "DevExpress WPF grid", "GridControl", "TableView", "CardView", "TreeListView", "dxg:GridControl", "DevExpress.Xp…

Install

npx vskill@latest install devexpress/agent-skills/devexpress-wpf-data-grid

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as devexpress/agent-skills/devexpress-wpf-data-grid.

DevExpress WPF Data Grid (GridControl)

The DevExpress WPF Data Grid is a data-aware control for displaying and editing data in tabular, card, and tree-style layouts. The primary class is DevExpress.Xpf.Grid.GridControl, which uses a pluggable View (TableView, CardView, or TreeListView) to render data and supports large datasets through server-mode and virtual sources. The grid handles sorting, filtering, grouping, summaries, master-detail data, conditional formatting, CRUD operations, and printing/exporting out of the box.

When to Use This Skill

Use this skill when you need to:

  • Add a GridControl to a WPF project and bind it to a data source
  • Bind to Entity Framework Core, XPO, local collections, ICollectionView, OData, or LINQ to SQL
  • Display large datasets with server mode or instant feedback mode (EntityServerModeSource, EntityInstantFeedbackSource)
  • Configure columns explicitly with GridColumn and FieldName
  • Replace the default in-place editor with a ComboBoxEdit, DateEdit, CheckEdit, or any BaseEdit descendant
  • Enable sorting, filtering, grouping, and total/group summaries
  • Implement CRUD operations against a database
  • Display master-detail data (nested grids, custom templates, or tabbed details)
  • Apply conditional formatting (color scales, data bars, icon sets, comparison rules)
  • Print or export grid data to XLSX, CSV, PDF, or HTML
  • Use the DevExpress Items Source Wizard at design time to scaffold binding code
  • Migrate a DataGrid (standard WPF) to GridControl

Prerequisites & Installation

NuGet Packages
PackagePurpose
DevExpress.Wpf.GridDesigner-mode install — installs the full grid package and adds toolbox items
DevExpress.Wpf.Grid.CoreCode-first install — minimal runtime assemblies for GridControl, GridColumn, views
DevExpress.Wpf.PrintingRequired for View.PrintPreview(), View.PrintDialog(), and report-based export
.NET 8+
bash
dotnet add package DevExpress.Wpf.Grid.Core

Add <TargetFramework>net8.0-windows</TargetFramework> and <UseWPF>true</UseWPF> to your .csproj. The Data Grid is Windows-only.

.NET Framework (4.6.2+)

See references/getting-started-dotnet-fw.md for the .NET Framework setup, including the list of required assemblies if you reference them directly instead of via NuGet.

Important: All DevExpress packages in a project must share the same version. A valid DevExpress license is required.

Before You Start — Ask the Developer

If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's AskUserQuestion tool or GitHub Copilot's askQuestions tool. If no such tool is available, ask the questions directly in the chat response before generating code.

Before generating code, ask these questions to avoid rework:

General Questions
  1. Target framework: .NET 8+ or .NET Framework 4.x?
  2. New or existing project: Creating a new WPF app, or adding GridControl to an existing one?
  3. DevExpress version: Which version are you targeting (e.g., 24.2, 25.1, 26.1)? All DX packages must use the same version.
WPF and Setup
  1. Designer or code: Do you prefer the Visual Studio designer (toolbox + Items Source Wizard) or a code-only / MVVM approach? Designer-based setup is faster for prototypes; code-first is preferred for MVVM apps.
Data Grid–Specific
  1. Data source: What is your data source?
  • Local collection (List<T>, ObservableCollection<T>, DataTable)
  • Entity Framework Core (DbSet<T> / Local)
  • XPO (XPCollection, XPInstantFeedbackSource)
  • Server mode (EntityServerModeSource, LinqServerModeSource) — required for very large data
  • Virtual source (custom paging API — REST, NoSQL, etc.)
  • ICollectionView or DataTable
  1. View type: Table View (default tabular), Card View (vertical fields per card), or TreeList View (hierarchical)? Default to Table View if unsure.
  2. Features needed: Which of these does the developer want — sorting, filtering, grouping, summaries, editing, master-detail, conditional formatting, printing/export? Match the references in the Navigation Guide below to the answers.
  3. Editing: Will users edit cells? If yes, ask whether CRUD operations should persist to a database, and what validation (row, cell, or both) is needed.
Rule: If the developer's answer is ambiguous or missing, ask before generating code. Do not guess.

Component Overview

The Data Grid is composed of these primary classes:

  • `DevExpress.Xpf.Grid.GridControl` — the main control. Holds columns, a View, summaries, and data source binding.
  • `DevExpress.Xpf.Grid.GridColumn` — defines a column. Bind to a field with FieldName, customize the in-place editor with EditSettings.
  • `DevExpress.Xpf.Grid.TableView` / `CardView` / `TreeListView` — pluggable Views that control layout and runtime behavior. Inherit from DataViewBase.
  • `DevExpress.Xpf.Grid.DataControlBase` — base class of GridControl. Owns ItemsSource, AutoGenerateColumns, EnableSmartColumnsGeneration, AllowLiveDataShaping.
  • `DevExpress.Xpf.Grid.ColumnBase` — base class of GridColumn. Owns FieldName, AllowSorting, EditSettings, CellTemplate, ShowSortIndicator.
  • `DevExpress.Xpf.Grid.GridViewBase` — base of TableView and CardView. Owns GroupedColumns, ShowGroupPanel, AllowGrouping, CellValueChanged.
  • `DevExpress.Xpf.Grid.GridSummaryItem` — defines a total or group summary.
Core Entry Point
xaml
<UserControl
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">
<dxg:GridControl ItemsSource="{Binding Orders}"
AutoGenerateColumns="AddNew"
EnableSmartColumnsGeneration="True">
<dxg:GridControl.View>
<dxg:TableView/>
</dxg:GridControl.View>
</dxg:GridControl>
</UserControl>

This three-line setup binds the grid to a collection, auto-generates columns, and uses the default TableView. For column-by-column control, add GridColumn elements explicitly (see Configure Columns and Editors).

Documentation & Navigation Guide

Getting Started

Refer to references/getting-started.md

When you need to:

  • Set up GridControl in a new .NET 8+ WPF project
  • Add the NuGet package and namespaces
  • Bind to a local collection or Entity Framework Core source
  • See a complete working example end-to-end

For .NET Framework 4.x: see references/getting-started-dotnet-fw.md.

Data Binding

Refer to references/data-binding.md

For an agent-driven advisor that inspects your ViewModel/DbContext/service code and picks the right source automatically, see the `devexpress-wpf-grid-datasource` skill instead — this section is the reference once you (or that skill) already know which source type to use.

When you need to:

  • Pick the right source type (decision matrix: local, `ChunkList<T>`, EF Core, Server Mode, Instant Feedback, Virtual Sources, RealTimeSource, ICollectionView, DataTable)
  • Bind to Entity Framework / XPO / OData / LINQ to SQL / WCF (6 server-mode source classes + 6 instant-feedback)
  • Implement Virtual Sources (InfiniteAsyncSource / PagedAsyncSource / FetchRowsAsyncSource) for REST/NoSQL/custom paging APIs
  • Tune frequent-update performance (BeginDataUpdate/EndDataUpdate, OptimizeSummaryCalculation, RealTimeSource, timer-based refresh)
  • Configure CRUD with ValidateRow / ValidateRowDeletion / DataSourceRefresh MVVM commands (Items Source Wizard pattern)
  • Understand Server Mode limitations (display-text sort/filter, custom sort, master-detail, TreeListView, etc.) and Virtual Source limitations (default-disabled features, grouping, search highlighting, etc.)
Views and Layout

Refer to references/views.md

When you need to:

  • Switch between Table, Card, and TreeList views; auto-fit columns (AutoWidth, BestFitModeOnSourceChange); reordering, resizing, Column Chooser; hierarchical data with TreeListView
Card View

Refer to references/card-view.md

When you need to:

  • Arrange records as cards (Columns vs Rows layout, alignment, MaxCardCountInRow); fixed-size cards with user resize (FixedSize, AllowCardResizing)
  • Customize card header (CardHeaderBinding, CardHeaderTemplate) or full card body (CardTemplate, CardStyle)
  • Expand / collapse cards in code (ExpandCard/CollapseCard/ExpandAllCards); print options specific to cards (PrintMaximumCardColumns)
  • Handle Card View limitations (no Data-Aware export, no master-detail)
Columns (Defining, Binding, Bands, Fixed, ColumnsSource)

Refer to references/columns.md

When you need to:

  • Define columns in XAML / code / auto-generation (AutoGenerateColumns); use Smart Columns Generation with data annotations ([Display], [DataType])
  • Pick between FieldName / Binding / unbound columns (decision matrix); implement unbound via CustomUnboundColumnData event or MVVM command
  • Organize columns into bands (XAML / code / [Display(GroupName)] / nested / multi-row); fix to left/right (BaseColumn.Fixed)
  • Generate columns from ViewModel via ColumnsSource + ColumnGeneratorTemplate; handle AutoGeneratedColumns event
  • Access columns at runtime (FieldName / Name / index / VisibleColumns)
Sorting, Filtering, Grouping

Refer to references/sorting-filtering-grouping.md

When you need to:

  • Sort by value / display text / custom logic (SortMode, CustomColumnSortCommand); sort by different field (SortFieldName); sort group rows by summary
  • Filter via UI (Drop-down — Regular/Checked/Excel-style/Date-Time/Custom, Auto Filter Row, Filter Editor, Filter Panel, Filter Elements) or in code (FilterString / FilterCriteria / MergeColumnFilters / FixedFilter)
  • Apply Data Analysis Filters (Top/Bottom N or %, Above/Below Average, Unique, Duplicate); implement `CustomRowFilter` for non-Criteria business rules; `SubstituteFilter` to rewrite user's filter
  • Group by value, date intervals (Year/Month/Quarter/Day/Range), alphabetical buckets, or custom logic; use merged grouping; implement `CustomColumnGroup` + `CustomGroupDisplayText`
  • Customize group row appearance (GroupRowStyle, GroupRowTemplate, GroupValueTemplate); understand server-mode / virtual-source caveats
Data Summaries

Refer to references/data-summaries.md

When you need to:

  • Display total or group summaries (GridSummaryItem, SummaryType)
  • Calculate summaries against selected rows only (SummaryCalculationMode)
  • Recalculate summaries when the bound data source changes (AllowLiveDataShaping)
  • Define summaries in a ViewModel
Cell Display and Editing

Refer to references/cell-display-and-editing.md

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
52
Repository forks
8
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • templateCustom templates for code generation

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/devexpress/agent-skills/devexpress-wpf-data-grid/badge)](https://verified-skill.com/skills/devexpress/agent-skills/devexpress-wpf-data-grid)

Something wrong with this skill or its page? Tell us.