
syncfusion-angular-treegrid
Implements Syncfusion Angular 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 Angular applications.
- Installs
- 308
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/syncfusion/angular-ui-components-skills --skill syncfusion-angular-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-angular-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 Angular TreeGrid
Complete guide to implementing and customizing the Syncfusion Angular TreeGrid component for hierarchical data visualization.
⚠️ Security & Trust Boundary
- The TreeGrid skill does not perform any remote data access.
- All external API interaction is handled by a separate DataManager skill outside this skill’s trust boundary.
Table of Contents
- When to Use This Skill
- Data Structure Rules
- Documentation Navigation Guide
- Quick Start Example
- Common Patterns
- Best Practices
- Key Props Summary
- Module Injection
When to Use This Skill
Use this skill when you need to:
- Display hierarchical or tree-structured data in a grid format
- Implement advanced data manipulation (sorting, filtering, searching, editing)
- Configure pagination, virtual scrolling for large datasets
- Add export functionality (PDF, Excel)
- Customize appearance with themes and CSS
- Handle selection, aggregates, and state management
- Support mobile/responsive design
- Implement row/column freezing
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
<ejs-treegrid
[dataSource]='data'
childMapping='subtasks'> // Property name is case-sensitive
</ejs-treegrid>
// ❌ WRONG - Will not work
<ejs-treegrid
[dataSource]='data'>
<!-- No expansion possible without childMapping -->
</ejs-treegrid>
Data Format:
// ✅ CORRECT - childMapping matches 'subtasks' property
public data = [
{
TaskID: 1,
TaskName: 'Parent',
subtasks: [ // Must match childMapping value
{ TaskID: 2, TaskName: 'Child' }
]
}
];
Exception: Use idMapping + parentIdMapping for flat parent-child structure:
// Alternative: Flat structure with parent IDs
<ejs-treegrid
[dataSource]='flatData'
idMapping='TaskID'
parentIdMapping='ParentID'
hasChildMapping='isParent'>
</ejs-treegrid>
Rule 2: Data Type Matching is MANDATORY
Severity: 🟠 IMPORTANT - Type mismatches cause rendering/sorting issues
Requirement:
// ✅ CORRECT - Type matches column definition
public data = [
{
TaskID: 1, // number type
TaskName: 'Planning', // string type
StartDate: new Date(), // Date object for date columns
}
];
// Column definition must match data types
<e-columns>
<e-column field='TaskID' headerText='ID' type='number'></e-column>
<e-column field='TaskName' headerText='Task' type='text'></e-column>
<e-column field='StartDate' headerText='Date' type='date' format='yMd'></e-column>
</e-columns>
// ❌ WRONG - Type mismatch
public data = [
{
TaskID: '1', // String instead of number
StartDate: '02/03/2024' // String instead of Date object
}
];
Documentation Navigation Guide
Getting Started & Setup
📄 Read: references/getting-started-guide.md
- Complete installation and setup
- Module configuration
- Project initialization
- First TreeGrid component
API Quick Reference
📄 Read: references/properties.md
- 70+ properties in organized tables
- Data binding, display, behavior, features
- Settings objects and modules
- Column properties quick reference
📄 Read: references/methods.md
- 60+ methods in organized tables
- Data management, selection, expand/collapse
- Filtering, sorting, export, editing
- DOM access and utility methods
📄 Read: references/events.md
- 56+ events in organized tables
- Cancelable events and async patterns
- Data, action, selection, edit events
- Export, print, and query events
Recommended for developers who need quick property/method/event lookup
Data Binding
📄 Read: references/data-binding.md
- Local and remote data binding
- ORM and custom adaptor implementation
- Loading data from various sources
Adaptors for Remote Data
📄 Read: references/adaptors.md
- 7 adaptor types for backend integration
- UrlAdaptor, ODataV4Adaptor, WebApiAdaptor, GraphQLAdaptor
- Custom adaptors and RemoteSaveAdaptor
- Backend configuration examples (C#, Node.js)
- Request/response format specifications
- Error handling and adaptor comparison
Observables Data
📄 Read: references/observables.md
- RxJS observables integration
- Async data binding patterns
- Observable-based event handling
- Async operators and pipelines
Column Configuration
📄 Read: references/column.md
- Column definition and width management
- Custom column templates and rendering
- Column reordering and freezing
Column Spanning
📄 Read: references/column-spanning.md
- Multi-column spanning configuration
- Cell spanning across columns
- Dynamic span calculation
Command Columns
📄 Read: references/command-column.md
- Command column with action buttons
- Edit, Delete, and Cancel buttons
- Custom command implementations
Column Menu
📄 Read: references/column-menu.md
- Column header context menu
- Sort, group, and filter menu items
- Custom column menu options
Column Chooser
📄 Read: references/column-chooser.md
- Column visibility toggle UI
- Show/hide columns dynamically
- Column chooser dialog configuration
Row Configuration
📄 Read: references/row.md
- Row templates and detail rows
- Row drag-drop functionality
- Row spanning and customization
Cell-Level Features
📄 Read: references/cell.md
- Cell styling and formatting
- Cell templates and tooltips
- Custom CSS and HTML content
Module System & Architecture
📄 Read: references/modules.md
- Module imports and dependencies
- Required service providers
- Angular version compatibility
- Library setup and initialization
Editing
📄 Read: references/editing.md
- Cell, inline, dialog, row, and batch editing
- Data validation and error handling
- Custom editors and validation rules
Sorting
📄 Read: references/sorting.md
- Single and multi-column sorting
- Custom sort comparers
- Sort order and keyboard navigation
Filtering
📄 Read: references/filtering.md
- Filter bar and menu modes
- Excel-like filtering
- Custom filters and predicates
Searching
📄 Read: references/searching.md
- Global and column-level search
- Case-sensitive searching
- Text highlighting
Selection
📄 Read: references/selection.md
- Row, cell, and checkbox selection modes
- Selection events and APIs
- Programmatic selection
Paging
📄 Read: references/paging.md
- Pagination configuration
- Server-side paging
- Page navigation APIs
Scrolling
📄 Read: references/scrolling.md
- Virtual scrolling for large datasets
- Infinite scroll and lazy loading
- Height/width management and scroll positioning
Frozen Columns
📄 Read: references/frozen-columns.md
- Freeze rows and columns
- Fixed visibility configuration
- Performance optimization
Aggregations
📄 Read: references/aggregates.md
- Summary calculations (Sum, Avg, Min, Max, Count)
- Footer templates and child aggregates
- Aggregate events
Export & Print
📄 Read: references/print.md
- Print functionality and modes
- Page setup and column visibility
- Custom print templates
📄 Read: references/pdf-export.md
- PDF export with styling
- Headers, footers, and watermarks
- Server-side export
📄 Read: references/excel-export.md
- Excel export configuration
- Cell styling and formatting
- Merged cells and custom data
📄 Read: references/csv-export.md
- CSV export configuration
- Custom data formatting for export
- Dynamic file naming
- Export events and callbacks
- Selected records export
User Interface & Interaction
📄 Read: references/toolbar.md
- Built-in toolbar items
- Custom toolbar items and alignment
- Toolbar event handling
📄 Read: references/clipboard.md
- Copy/paste operations
- Custom clipboard formats
- Clipboard event handling
📄 Read: references/context-menu.md
- Context menu configuration
- Built-in and custom menu items
- Menu event handling
Appearance & Responsiveness
📄 Read: references/adaptive.md
- Responsive and adaptive design
- Mobile optimization
- Breakpoints and device detection
📄 Read: references/styling.md
- Built-in themes (Material, Bootstrap, Fabric, Tailwind)
- CSS customization and overrides
- Row/cell conditional styling
Performance
📄 Read: references/performance-optimization.md
- Virtual scrolling and lazy loading
- Pagination for large datasets
- Column virtualization and rendering optimization
- Query optimization strategies
State Management
📄 Read: references/state-persistence.md
- Save and restore grid state
- LocalStorage integration
- Custom state management
Foreign-key
📄 Read: references/foreign-keys.md
- Foreign key column configuration
- Display text mapping for FK values
- Dropdown editors for FK fields
- Cascading foreign key relationships
- Remote data binding for FK data
Row Drag and Drop
📄 Read: references/row-drag-drop.md
- Hierarchical drag-and-drop operations
- Parent-child relationship updates
- Circular hierarchy prevention
- Drop event validation and constraints
- Visual feedback during drag operations
Validation
📄 Read: references/validation.md
- Built-in and custom validation rules
- Async validation against server
- Cross-field validation patterns
- Server-side validation strategies
- Error display and highlighting
- Conditional validation rules
Globalization
📄 Read: references/globalization.md
- Localization and language support
- RTL (Right-to-Left) support
- Cultural formatting and date/number formats
Loading Animation
📄 Read: references/loading-animation.md
- Loading spinner configuration
- Custom loading templates
- Loading animation customization
Accessibility & Compliance
📄 Read: references/accessibility.md
- WCAG 2.1 Level AA conformance
- ARIA labels and attributes
- Keyboard navigation and screen reader support
- Focus management and visual indicators
- Accessibility testing guidance
Quick Start Example
import { Component, ViewChild } from '@angular/core';
import { TreeGridComponent } from '@syncfusion/ej2-angular-treegrid';
import { PageService, SortService, FilterService, EditService } from '@syncfusion/ej2-angular-treegrid';
@Component({
selector: 'app-treegrid',
template: `
<ejs-treegrid
#treegrid
[dataSource]='data'
[childMapping]='childMapping'
[allowPaging]='true'
[allowSorting]='true'
[allowFiltering]='true'
<e-columns>
<e-column field='TaskID' headerText='Task ID' width='90' isPrimaryKey='true'></e-column>
<e-column field='TaskName' headerText='Task Name' width='200'></e-column>
</e-columns>
</ejs-treegrid>
`,
providers: [PageService, SortService, FilterService, EditService]
})
export class AppComponent {
@ViewChild('treegrid') treegrid!: TreeGridComponent;
public data: Object[] = [
{
TaskID: 1,
TaskName: 'Planning',
subtasks: [
{ TaskID: 2, TaskName: 'Scope', Duration: 4, Progress: 100 },
{ TaskID: 3, TaskName: 'Budget', Duration: 4, Progress: 100 }
]
}
];
public childMapping: string = 'subtasks';
public editSettings = { mode: 'Cell', allowEditing: true, allowDeleting: true, allowAdding: true };
}
Best Practices
-
Performance Optimization
- Use virtual scrolling for large datasets (10,000+ records)
- Implement server-side operations (sorting, filtering, paging)
- Use frozen columns sparingly to avoid layout shifts
-
Data Management
- Always provide a primary key (isPrimaryKey='true')
- Use ChildMapping for hierarchical data
- Implement proper error handling for API calls
-
User Experience
- Provide loading indicators during data fetch
- Implement search and filter for data discovery
- Show validation messages for editing errors
- Support keyboard navigation and accessibility
-
Customization
- Use themes for consistent styling
- Create reusable cell templates for common patterns
- Style conditional rows for user guidance
- Implement responsive design for mobile devices
-
State Management
- Enable state persistence for user preferences
- Save sort, filter, and column settings
Key Props Summary
| Prop | Type | Default | Use Case |
|---|---|---|---|
dataSource | DataManager|Object[] | null | Set grid data source |
childMapping | string | null | Property for child records (must be explicitly set) |
allowPaging | boolean | false | Enable pagination |
allowSorting | boolean | false | Enable sorting |
allowFiltering | boolean | false | Enable filtering |
editSettings | EditSettings | {} | Configure edit mode |
enableVirtualization | boolean | false | Enable virtual scrolling |
Module Injection
Must inject required services:
import { PageService, SortService, FilterService, EditService, ExcelExportService, PdfExportService,
PrintService, AggregateService, ToolbarService } from '@syncfusion/ej2-angular-treegrid';
@Component({
providers: [
PageService,
SortService,
FilterService,
EditService,
ExcelExportService,
PdfExportService,
PrintService,
AggregateService,
ToolbarService
]
})
FAQ
What does the syncfusion-angular-treegrid skill do?
Implements Syncfusion Angular 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 Angular applications.
How do I install syncfusion-angular-treegrid?
Run npx skills add https://github.com/syncfusion/angular-ui-components-skills --skill syncfusion-angular-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-angular-treegrid/ (personal) or .claude/skills/syncfusion-angular-treegrid/ (project).
Which AI agents can use syncfusion-angular-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-angular-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-angular-treegrid?
It is published by syncfusion in syncfusion/angular-ui-components-skills. It has 308 recorded installs.
More from syncfusion/angular-ui-components-skills
syncfusion-angular-grid
syncfusion/angular-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-angular-common
syncfusion/angular-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-angular-chart
syncfusion/angular-ui-components-skills
Implement Syncfusion Angular Chart component for professional data visualization. Use this when creating or customizing charts such as line, bar, column, area, pie, financial (candlestick, OHLC), scatter, bubble, or stock charts. Supports axes configuration, series binding, legends, tooltips, zooming, real-time updates, technical indicators, themes, export, and accessibility features.
syncfusion-angular-themes
syncfusion/angular-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-angular-license
syncfusion/angular-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-angular-rich-text-editor
syncfusion/angular-ui-components-skills
Open the skill to read its SKILL.md instructions.
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.