
syncfusion-react-treegrid
Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.
- Installs
- 747
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-treegrid- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads syncfusion-react-treegrid automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Syncfusion React TreeGrid
A comprehensive skill for implementing and customizing Syncfusion's React TreeGrid component. TreeGrid visualizes self-referential hierarchical data in a tabular layout with expand/collapse functionality, enterprise features like virtual scrolling, and comprehensive export options.
Table of Contents
- When to Use This Skill
- TreeGrid Overview
- Data Structure Rules
- Documentation Navigation Guide
- Quick Start Example
When to Use This Skill
Use this skill when you need to:
- Display hierarchical or tree-structured data (organizational charts, file systems, bill of materials)
- Configure columns with proper data binding and formatting
- Implement data editing (cell, row, dialog, batch, template modes)
- Add sorting, filtering, and searching capabilities
- Handle row and cell operations (selection, templates, spanning)
- Optimize performance with virtual scrolling or infinite scrolling
- Configure paging and scrolling strategies
- Export data to PDF, Excel, or CSV formats
- Implement state persistence and aggregation
- Customize appearance with themes and styling
- Support accessibility and internationalization (RTL, localization)
TreeGrid Overview
The TreeGrid is optimized for displaying self-referential hierarchical data with:
- Auto-expand/collapse functionality for collapsible rows
- Enterprise features: virtual scrolling, aggregates, state persistence
- Adaptive UI for mobile and small screens
- Comprehensive export: PDF, Excel, CSV formats
- Full accessibility: WCAG compliance, keyboard navigation, ARIA support
- Internationalization: RTL support, locale customization
Data Structure Rules
Rule 1: childMapping is MANDATORY for Hierarchical Data
Severity: 🔴 CRITICAL - Grid will not expand/collapse without this
Requirement:
// ✅ REQUIRED - Must match data property name exactly
<TreeGridComponent
dataSource={data}
childMapping='subtasks'>
<ColumnsDirective>
{/* Columns */}
</ColumnsDirective>
</TreeGridComponent>
// ❌ WRONG - Will not work
<TreeGridComponent
dataSource={data}>
{/* No childMapping = No expansion possible */}
</TreeGridComponent>
Data Format:
// ✅ CORRECT - childMapping matches 'subtasks' property
const data = [
{
TaskID: 1,
TaskName: 'Parent',
subtasks: [ // Must match childMapping value exactly
{ TaskID: 2, TaskName: 'Child' }
]
}
];
Exception: Use idMapping + parentIdMapping for flat parent-child structure:
// Alternative: Flat structure with parent IDs
<TreeGridComponent
dataSource={flatData}
idMapping='TaskID'
parentIdMapping='ParentID'
hasChildMapping='isParent'>
</TreeGridComponent>
Rule 2: Data Type Matching is MANDATORY
Severity: 🟠 IMPORTANT - Type mismatches cause rendering/sorting issues
Requirement:
// ✅ CORRECT - Type matches column definition
const data = [
{
TaskID: 1, // number type
TaskName: 'Planning', // string type
StartDate: new Date(), // Date object for date columns
}
];
// Column definition must match data types
<ColumnsDirective>
<ColumnDirective field='TaskID' headerText='ID' type='number'></ColumnDirective>
<ColumnDirective field='TaskName' headerText='Task' type='string'></ColumnDirective>
<ColumnDirective field='StartDate' headerText='Date' type='date' format='yMd'></ColumnDirective>
</ColumnsDirective>
// ❌ WRONG - Type mismatch
const data = [
{
TaskID: '1', // String instead of number
StartDate: '02/03/2024' // String instead of Date object
}
];
Complete Props Reference
📄 Property and Methods: references/programmatic-api.md
📄 Events Reference 📖 references/events-reference.md
- Complete event reference guide
- Data events (actionBegin, actionComplete, actionFailure)
- Editing events (cellEdit, cellSave, beforeEdit)
- Selection events (rowSelected, rowDeselected, cellSelected)
- Expand/collapse events
- Column events (drag, drop, resize, hide, show)
- Row events and utilities
Documentation Navigation Guide
Data Binding
📖 references/data-binding.md
- Local vs. remote data sources
- Self-referential parent-child relationships
- DataManager integration
- ExpandStateMapping for initial expand state
- Complex data binding for nested objects
Column Configuration
📖 references/column.md
- Column definitions and field mapping
- Tree column index setup
- Data types and formatting
- Column templates and custom rendering
- Headers and styling
- Foreign key columns
Row Operations
📖 references/row.md
- Row templates and custom rendering
- Row height configuration
- Row spanning
- Detail templates for nested content
- Row drag-and-drop
- Indent and outdent operations
Cell Operations
📖 references/cell.md
- Cell editing
- Cell templates, styling and attributes
- Cell selection
- Cell formatting
Editing
📖 references/editing.md
- Cell editing mode
- Row editing mode
- Dialog editing
- Batch editing
- Template editing
- Validation rules and custom validators
- Command column editing
- Server-side persistence
Sorting
📖 references/sorting.md
- Single and multi-column sorting
- Initial sort order configuration
- Custom sort comparers
- Sorting with templates
- Programmatic sorting
Filtering
📖 references/filtering.md
- Filter bar mode
- Filter menu mode
- Excel-like filtering
- Custom filters
- Programmatic filtering
- Filter templates
Searching
📖 references/searching.md
- Global search across all columns
- Search highlight
- Programmatic search
- Search with templates
Selection
📖 references/selection.md
- Row selection (single and multiple)
- Cell selection
- Checkbox selection
- Selection mode configuration
- Programmatic selection
- Selection change events
Display & Layout (Performance & Presentation)
📄 Paging 📖 references/paging.md
- Pager configuration and options
- Page size settings
- Initial page settings
- Pager template customization
- Programmatic pagination
📄 Scrolling 📖 references/scrolling.md
- Vertical and horizontal scrolling
- Scroll height configuration
- Scroll position control
- Sticky headers
- Responsive scrolling
📄 Frozen Rows and Columns 📖 references/frozen-rows-columns.md
- Freeze header rows
- Freeze columns
- Freeze direction
- Lock columns
- IsFrozen property usage
📄 Virtual Scrolling & Infinite Scrolling 📖 references/virtual-scrolling-infinite-scrolling.md
- Virtual scrolling for large datasets
- Infinite scrolling configuration
- Row height for virtual scroll
- ViewportIndex and ViewportStartIndex
- Performance optimization with virtual scroll
Aggregates
📖 references/aggregates.md
- Standard aggregates (Sum, Average, Min, Max, Count)
- Custom aggregates
- Footer aggregates
- Group aggregates
- Hierarchical aggregates for child data
State Persistence
📖 references/state-persistence.md
- Global state persistence
- Local state persistence
- ExpandState tracking
- Persist sort, filter, and paging
- State restoration on reload
Toolbar
📖 references/toolbar.md
- Built-in toolbar items
- Custom toolbar items
- Toolbar item types (Button, Separator, Dropdown)
- Toolbar item click handling
- Toolbar template customization
Context Menu
📖 references/context-menu.md
- Built-in context menu items
- Custom context menu items
- Menu item click handling
- Copy/Edit/Delete operations
- Header context menu
Adaptive View
📖 references/adaptive-view.md
- Adaptive UI for small screens
- Full-screen dialogs
- Horizontal row rendering
- Responsive column adjustments
- Mobile optimization
Loading Animation
📖 references/loading-animation.md
- Loading indicator display
- Custom loading spinner
- Loading state management
- Spinner animation control
Export & Print
📄 PDF Export 📖 references/pdf-export.md
- PDF export configuration
- Export options (columns, format)
- Headers and footers
- Page orientation and size
- Server-side export
- Exporting hierarchical data
📄 Excel Export 📖 references/excel-export.md
- Excel export configuration
- Export options (columns, formatting)
- Cell styling in export
- Headers and footers
- Server-side export
- Exporting hierarchical levels
📄 Print 📖 references/print.md
- Print configuration
- Print with custom layout
- Print specific ranges
- Print hierarchy levels
- Print preview
Clipboard
📖 references/clipboard.md
- Copy cell content to clipboard
- Copy entire rows
- Paste operations
- Copy hierarchy with levels
- Clipboard event handling
Column Features (Advanced)
📄 Column Reorder 📖 references/column-reorder.md
- Enable column drag-and-drop reordering
- Prevent specific columns from reordering
- Reorder events and callbacks
- Programmatic column reordering
📄 Column Resize 📖 references/column-resize.md
- Enable column drag resize
- Auto-fit columns to content
- Column width constraints (min/max)
- Resize events
- Programmatic width changes
- Save/restore column widths
📄 Column Menu 📖 references/column-menu.md
- Built-in column menu items
- Sort, filter, and column chooser from menu
- Custom menu items
- Menu events and handlers
- Conditional menu items
📄 Column Chooser 📖 references/column-chooser.md
- Toggle column visibility
- Column chooser dialog configuration
- Show/hide columns programmatically
- Column visibility events
- Save/restore column visibility
📄 Command Column 📖 references/command-column.md
- Built-in command buttons (Edit, Delete, Save, Cancel)
- Custom command buttons
- Command click handlers
- Icon customization
- Row action patterns
Server Integration
📖 references/server-integration.md
- Remote data binding with DataManager
- Server-side CRUD operations
- Server-side filtering and sorting
- Server-side paging
- Custom request/response handling
- Error handling strategies
- Batch operations
Validation Patterns
📖 references/validation-patterns.md
- Column validation rules
- Custom validation logic
- Cross-field validation
- Async validation (API calls)
- Server-side validation
- Dialog form validation
- Conditional validation
- Error message display
Performance Optimization
📖 references/performance-optimization.md
- Virtual scrolling for large datasets (100k+ rows)
- Infinite scrolling with caching
- Bundle size optimization
- Disabling unnecessary features
- Server-side operations optimization
- Memoization and rendering optimization
- Template optimization
- Event handler optimization
- Benchmarking and performance monitoring
- Performance checklist
Customization
📖 references/styling-appearance.md
- CSS class customization
- Theme selection (Material, Bootstrap, Fluent, Tailwind)
- CSS variable overrides
- Component-specific styling
- Dark mode support
- Row styling
- Cell styling
Globalization
📖 references/globalization.md
- Internationalization (i18n)
- Localization (l10n) for UI text
- Right-to-left (RTL) support
- Date formatting per locale
- Number formatting per locale
- Currency localization
Accessibility
📖 references/accessibility.md
- WCAG 2.1 Level AA compliance
- Keyboard navigation (all shortcuts)
- ARIA attributes and screen reader support
- Expand/collapse keyboard shortcuts
- Editing keyboard navigation
- Selection shortcuts
Quick Start Example
import React from 'react';
import { TreeGridComponent, ColumnsDirective, ColumnDirective, Inject, Page } from '@syncfusion/ej2-react-treegrid';
import { DataManager, UrlAdaptor } from '@syncfusion/ej2-data';
interface ITreeData {
TaskID?: number;
TaskName?: string;
parentID: number | null;
Children?: ITreeData[];
}
export default function App() {
const data: ITreeData[] = [
{
TaskID: 1,
TaskName: 'Planning',
parentID: null,
Children: [{ TaskID: 2, TaskName: 'Plan timeline', parentID: 1 }]
}
];
return (
<TreeGridComponent
dataSource={data}
childMapping="Children"
treeColumnIndex={1}
height="auto"
allowPaging={true}
>
<ColumnsDirective>
<ColumnDirective field="TaskID" headerText="Task ID" width={80} />
<ColumnDirective field="TaskName" headerText="Task Name" width={160} />
</ColumnsDirective>
<Inject services={[Page]} />
</TreeGridComponent>
);
}
Core Configuration
| Property | Type | Default | Description |
|---|---|---|---|
dataSource | Array | DataManager | [] | Data source for TreeGrid |
childMapping | string | null | Property name for child records (e.g., "Children") |
idMapping | string | null | Property name for unique ID (flat data) |
parentIdMapping | string | null | Property name for parent ID (flat data) |
hasChildMapping | string | null | Property for lazy load indicator |
treeColumnIndex | number | 0 | Column index for tree expand icons |
expandStateMapping | string | null | Property for initial expand state |
FAQ
What does the syncfusion-react-treegrid skill do?
Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.
How do I install syncfusion-react-treegrid?
Run npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-treegrid in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-react-treegrid/ (personal) or .claude/skills/syncfusion-react-treegrid/ (project).
Which AI agents can use syncfusion-react-treegrid?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is syncfusion-react-treegrid safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains syncfusion-react-treegrid?
It is published by syncfusion in syncfusion/react-ui-components-skills. It has 747 recorded installs.
More from syncfusion/react-ui-components-skills
syncfusion-react-grid
syncfusion/react-ui-components-skills
Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
syncfusion-react-scheduler
syncfusion/react-ui-components-skills
Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.
syncfusion-react-gantt-chart
syncfusion/react-ui-components-skills
Implement, configure, and customize the Syncfusion React Gantt Chart component. Use this when building project scheduling applications with task timelines, dependencies, resource management, and calendar-driven scheduling. Covers GanttComponent setup, task constraints, taskbar customization, filtering, sorting, Excel/PDF export, critical path analysis, milestones, predecessors, resource view, baseline tracking, and task calendar configuration.
syncfusion-react-rich-text-editor
syncfusion/react-ui-components-skills
Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.
syncfusion-react-charts
syncfusion/react-ui-components-skills
Implement Syncfusion React Charts component for data visualization. Use this when creating charts, configuring axes and series, or customizing visualization styles. This skill covers chart types, data binding, user interactions, financial indicators, accessibility features, and professional data visualization in React applications.
syncfusion-react-common
syncfusion/react-ui-components-skills
Common utilities and features for Syncfusion React components. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion React components.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.