agentsclimarketplace

Syncfusion wpf excel like grid

Skill syncfusion/wpf-ui-components-skills/skills/syncfusion-wpf-excel-like-grid

Skills for Syncfusion WPF controls. Enable AI-assisted development with comprehensive documentation, code examples, and best practices for 100+ UI controls including DataGrid, Charts, Scheduler, and more.

Install
npx -y skills add syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-excel-like-grid

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Complete guide for implementing the Syncfusion WPF GridControl β€” an Excel-like, cell-based virtual grid for Windows Presentation Foundation applications. Use this when working with WPF GridControl or Syncfusion grid components, including cell types, virtual grids, formula cells, clipboard operations, and Excel import/export. Covers QueryCellInfo events, GridStyleInfo, GridModel, row/column management, and appearance customization for desktop applications.

SKILL.md

8.3 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it

Implementing Syncfusion WPF GridControl

The Syncfusion WPF GridControl is a high-performance, cell-oriented grid that functions as a flexible tabular display engine. It makes no assumptions about data structure, supports virtual (on-demand) data loading via QueryCellInfo, and provides Excel-like behaviors including formulas, import/export, clipboard operations, covered cells, and 20+ built-in cell types.

When to Use This Skill

  • Adding a GridControl to a WPF application (XAML or code-behind)
  • Populating cells via direct assignment or the virtual QueryCellInfo event
  • Configuring cell types (CheckBox, ComboBox, DateTimeEdit, FormulaCell, etc.)
  • Customizing cell appearance (background, font, borders, data formats)
  • Managing rows and columns (insert, remove, move, freeze, hide)
  • Clipboard, undo/redo, and editing behavior
  • Interactive features: drag-drop columns, cell drag-drop, resizing
  • Formula cell support and the built-in formula library
  • Exporting grid data to Excel; importing Excel workbooks into the grid
  • Selection modes, events, and virtual mode patterns
  • Performance tuning, virtualization, covered ranges, zooming
  • Advanced features: comments, tooltips, printing, serialization, autofit

Documentation and Navigation Guide

Getting Started

πŸ“„ Read: references/getting-started.md

  • Required assembly references
  • Adding GridControl via designer or programmatically
  • Setting RowCount and ColumnCount
  • Populating data by loop vs. QueryCellInfo virtual event
  • Minimal working example

Cell Types

πŸ“„ Read: references/cell-types.md

  • 20+ built-in cell types: Header, Static, CheckBox, Button, Image, ComboBox, DropDownList, DateTimeEdit, IntegerEdit, DoubleEdit, CurrencyEdit, PercentEdit, MaskEdit, UpDownEdit, RichText, DataBoundTemplate, NestedGrid (ScrollGrid)
  • Setting Style.CellType on individual cells or ranges
  • ComboBox with ChoiceList vs. ItemsSource
  • Custom cell types (CellModel + CellRenderer pattern)

Appearance and Styling

πŸ“„ Read: references/appearance-and-styling.md

  • GridStyleInfo class and style inheritance hierarchy
  • Volatile vs. render cell styles
  • Base styles (BaseStylesMap), TableStyle, RowStyles, ColumnStyles
  • Background (solid/gradient), Foreground, Font, text orientation, borders
  • Numeric and DateTime format strings; FormatProvider interface

Managing Rows and Columns

πŸ“„ Read: references/managing-rows-and-columns.md

  • Setting row/column counts and default sizes
  • Hiding and unhiding rows/columns (SetHidden)
  • Freezing rows/columns; footer and header rows/columns
  • Inserting, moving, and removing rows/columns at runtime
  • Resize behavior and disabling resize controllers

Editing, Clipboard, and Undo/Redo

πŸ“„ Read: references/editing-clipboard-undo.md

  • CopyPasteOption flags (CopyText, CopyCellData, PasteCell, CutCell, XmlCopyPaste)
  • TextDataExchange for custom delimiters and buffer-based operations
  • Clipboard events and IGridCopyPaste custom implementation
  • CommandStack: Undo/Redo, BeginTrans, CommitTrans, Rollback
  • Creating derived commands for extended undo/redo

Interactive Features

πŸ“„ Read: references/interactive-features.md

  • Column drag-drop (AllowDragColumns)
  • Excel-like cell drag-drop (AllowDragDrop, DataObjectConsumerOptions)
  • Runtime row/column resizing and disabling resize controllers
  • Hide/unhide rows and columns visually (HiddenBorderBrush, SetHidden)

Formula Cells

πŸ“„ Read: references/formula-cells.md

  • Enabling FormulaCell type for individual cells or the entire grid
  • Built-in formula library (150+ functions: Sum, Avg, Sqrt, Pow, Cos, Sin, etc.)
  • Arithmetic operators and calculation precedence
  • Cross-cell references (A1 notation), named ranges
  • Adding custom formula functions to the library

Excel Import and Export

πŸ“„ Read: references/excel-import-export.md

  • Required assemblies (Syncfusion.XlsIO, Syncfusion.GridConverter.Wpf)
  • Exporting entire or selected grid content to .xls / .xlsx
  • Importing Excel workbooks: styles, formulas, conditional formatting, freeze panes, hyperlinks, comments
  • Virtualized import for large workbooks

Selection and Events

πŸ“„ Read: references/selection-and-events.md

  • Selection modes: cell, row, column (AllowSelection flags)
  • QueryCellInfo event pattern for virtual data loading
  • PrepareRenderCell for view-specific overrides
  • Common grid events: CommitCellInfo, CurrentCellActivated, clipboard events, RowsInserted, ColumnsMoved, ResizingRows, etc.
  • Working with GridRangeInfo and SelectedRanges

Performance and Virtualization

πŸ“„ Read: references/performance-virtualization.md

  • Virtual mode fundamentals and QueryCellInfo best practices
  • Covered ranges (CoveredCells) and floating cells
  • Zooming the grid
  • High-frequency update patterns

Advanced Features

πŸ“„ Read: references/advanced-features.md

  • Cell comments, input-message tips, and tooltips
  • Cell layout customization (covered cells, merged ranges, autofit)
  • Printing grid content
  • Serialization: saving and loading grid state
  • Autofit rows and columns to content

Quick Start Example

   1. Add assemblies: 
      Syncfusion.Grid.Wpf
      Syncfusion.GridCommon.Wpf,
      Syncfusion.Linq.Base, 
      Syncfusion.Shared.Wpf

  // 2. XAML β€” place GridControl inside a ScrollViewer
<ScrollViewer>
     <syncfusion:GridControl x:Name="gridControl" />
</ScrollViewer>

// 3. Code-behind: set size and populate
gridControl.Model.RowCount = 100;
gridControl.Model.ColumnCount = 10;

// Option A β€” direct assignment
for (int i = 0; i < 100; i++)
    for (int j = 0; j < 10; j++)
        gridControl.Model[i, j].CellValue = $"{i}/{j}";

// Option B β€” virtual mode (preferred for large data)
gridControl.QueryCellInfo += (s, e) =>
{
    if (e.Cell.RowIndex > 0 && e.Cell.ColumnIndex > 0)
        e.Style.CellValue = $"{e.Cell.RowIndex}/{e.Cell.ColumnIndex}";
};

Common Patterns

Apply a Cell Type to a Range

// Set an entire column to CheckBox
for (int i = 1; i <= gridControl.Model.RowCount; i++)
    gridControl.Model[i, 3].CellType = "CheckBox";

Alternate Row Colors via PrepareRenderCell

gridControl.PrepareRenderCell += (s, e) =>
{
    if (e.Cell.RowIndex > 0 && e.Cell.RowIndex % 2 == 0)
        e.Style.Background = Brushes.LightSkyBlue;
};

Freeze Header and Enable Formula Cells

gridControl.Model.FrozenRows = 1;
gridControl.Model.HeaderRows = 1;
gridControl.BaseStylesMap["Standard"].StyleInfo.CellType = "FormulaCell";

Export to Excel

gridControl.Model.ExportToExcel(@"Output.xlsx", ExcelVersion.Excel2007);

Key Style Properties

PropertyPurpose
Model[r, c].CellTypeSets built-in or custom cell type string
Model[r, c].CellValueData value stored in the cell
Model[r, c].BackgroundCell background brush
Model[r, c].ForegroundCell text color
Model[r, c].Font.FontSizeCell font size
Model[r, c].BordersIndividual border pens (Top/Bottom/Left/Right)
Model[r, c].FormatFormat string (e.g., "C", "0.00", "d")
Model.RowHeights[r]Row height in device-independent units
Model.ColumnWidths[c]Column width
Model.FrozenRowsNumber of rows frozen at top
Model.FrozenColumnsNumber of columns frozen at left

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.