Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-blazor-treegrid同步融合 Blazor 树形网格

Agent Skill

syncfusion-blazor-treegrid 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

948

周安装

38

GitHub Stars

公开资料未说明

下载量

307
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-blazor-treegrid(同步融合 Blazor 树形网格)
来源仓库:https://github.com/syncfusion/blazor-ui-components-skills
仓库路径:skills/syncfusion-blazor-treegrid
安装命令:
npx skills add https://github.com/syncfusion/blazor-ui-components-skills --skill syncfusion-blazor-treegrid
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/blazor-ui-components-skills --skill syncfusion-blazor-treegrid

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • syncfusion-blazor-treegrid 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Implementing Syncfusion Blazor TreeGrid

The Syncfusion Blazor TreeGrid (SfTreeGrid<TValue>) renders hierarchical data in a tabular format with expand/collapse rows. It supports self-referential flat data (IdMapping/ParentIdMapping) and nested child collections, combined with a full suite of grid features including editing, filtering, sorting, virtualization, and export.

When to Use This Skill

  • User needs a hierarchical/tree-structured data table in a Blazor app
  • User mentions SfTreeGrid, TreeGrid, IdMapping, ParentIdMapping
  • User needs parent-child rows with expand/collapse in a grid
  • User needs CRUD operations on tree-structured data
  • User needs to export, filter, sort, or page hierarchical data
  • User needs to bind TreeGrid to a GraphQL API using GraphQLAdaptor
  • User is working with organizational charts, task hierarchies, bill of materials, file explorer-style data in grid form
  • User migrating from flat DataGrid to hierarchical TreeGrid
  • User setting up TreeGrid in a Blazor Web App, WASM, Server, or MAUI project

Trigger keywords: TreeGrid, Tree Grid, SfTreeGrid, hierarchical grid, parent-child grid, IdMapping, ParentIdMapping, tree data table, nested grid rows, Syncfusion Blazor tree, GraphQL TreeGrid, GraphQLAdaptor TreeGrid


🔒 Mandatory Key Rules

These rules govern how this skill MUST behave. They are mandatory and must be strictly followed.

1. Purpose and Responsibility

Your responsibility is to interpret any natural‑language user request and provide accurate, complete, and validated information about all supported aspects of the Syncfusion Blazor TreeGrid, including:

  • Public APIs
  • Properties
  • Events
  • Features
  • Behaviors

2. Accuracy and API Compliance

The Skill MUST:

  • Use only officially supported Syncfusion TreeGrid features.
  • NEVER invent APIs, methods, properties, events, behaviors, or future features.
  • NEVER provide unsupported or hypothetical code samples.
  • ALWAYS follow official Syncfusion component design patterns.

If a feature is not supported: clearly state the limitation and suggest a supported alternative when possible.

3. Interpreting Natural-Language Requests

When user requests are incomplete:

  • Infer reasonable assumptions using official TreeGrid best practices.
  • Fill missing gaps with accurate and relevant information.
  • Request clarification only when essential.

4. Handling Unsupported User Requests

If the user asks for an unsupported capability:

  • Explicitly state that it is not supported
  • Suggest official alternatives or valid workarounds
  • NEVER simulate or fabricate impossible functionality

5. Design Pattern Enforcement

The Skill MUST follow Syncfusion official patterns, including:

  • Correct component structure (SfTreeGrid, TreeGridColumn, TreeGridEditSettings, TreeGridEvents, etc.)
  • Proper async event and API usage
  • Valid configuration properties and enums
  • Supported data‑binding approaches (self-referential, hierarchical, remote, custom adaptor, GraphQL)
  • Real event patterns and names

6. Quality, Completeness & Reliability

The Skill MUST:

  • Use only validated and real TreeGrid capabilities
  • Provide actionable and implementation‑ready guidance
  • Ensure clarity so users can follow without guesswork
  • Maintain clean, readable, and professional formatting

7. No-Hallucination Safeguard

The Skill MUST NOT:

  • Invent non‑existent APIs or behavior
  • Suggest unsupported modes, features, or configuration
  • Provide incorrect, misleading, or unverifiable code
  • Describe undocumented internal behavior

If unsure: ask for clarification OR clearly state the limitation.

8. Event Name Verification Requirement

CRITICAL: Event names MUST be verified against references/events.md BEFORE providing code examples. All tree grid events MUST be defined inside the <TreeGridEvents> component

Common Mistakes to Avoid:

  • OnSortChange — Does NOT exist. Use Sorting, Sorted instead
  • OnFilterChange — Does NOT exist. Use Filtering, Filtered instead

Rule: ALWAYS cross-reference references/events.md for:

  • Exact event names (case-sensitive)
  • Event argument types (see Rule 11 for namespace resolution)
  • Whether events are cancelable (✅ or ❌)
  • When they fire (before/after operation)

9. Read Reference Files Before Writing Code

Before generating any code, identify every feature in the request and read the reference file for each one. The snippets in this file are abbreviated — they omit critical rules and known pitfalls. Reference files are the authoritative source.

⚠️ Read ALL reference files that apply — not just the one most obvious from the query.

10. Namespace and Type Resolution Rules

Rule 1: Always use full namespace qualification to avoid CS0104 "ambiguous reference" errors. Types exist in both Syncfusion.Blazor.TreeGrid and Syncfusion.Blazor.Grids namespaces.

Rule 2: Always include @using Syncfusion.Blazor.Grids; in _Imports.razor or component to prevent CS0103 "missing reference" errors for:

  • Event argument types (ActionEventArgs, RowDataBoundEventArgs, BeforeCopyPasteEventArgs, etc.)
  • The Action enum (Action.Sorting, Action.Save, etc.)
  • Component classes (TreeGridPageSettings, TreeGridFilterSettings, TreeGridSelectionSettings, etc.)
  • Event handler support classes

Rule 3: The following event arg types belong to Syncfusion.Blazor.TreeGrid — add @using Syncfusion.Blazor.TreeGrid; (NOT Syncfusion.Blazor.Grids):

  • RowExpandingEventArgs<TValue>, RowExpandedEventArgs<TValue>
  • RowCollapsingEventArgs<TValue>, RowCollapsedEventArgs<TValue>
  • CheckBoxChangeEventArgs<TValue>

Type Reference:

TypeNamespaceExample
FilterTypeTreeGridSyncfusion.Blazor.TreeGrid.FilterType.Excel
EditModeTreeGridSyncfusion.Blazor.TreeGrid.EditMode.Row
CopyHierarchyTypeTreeGridSyncfusion.Blazor.TreeGrid.CopyHierarchyType.Both
ActionGridsSyncfusion.Blazor.Grids.Action.Save
TextAlignGridsSyncfusion.Blazor.Grids.TextAlign.Right
ColumnTypeGridsSyncfusion.Blazor.Grids.ColumnType.Date
EditTypeGridsSyncfusion.Blazor.Grids.EditType.DatePickerEdit
SelectionModeGridsSyncfusion.Blazor.Grids.SelectionMode.Row
SelectionTypeGridsSyncfusion.Blazor.Grids.SelectionType.Multiple
ClipModeGridsSyncfusion.Blazor.Grids.ClipMode.Ellipsis
GridLineGridsSyncfusion.Blazor.Grids.GridLine.Horizontal
AggregateTypeGridsSyncfusion.Blazor.Grids.AggregateType.Sum
CellSelectionModeGridsSyncfusion.Blazor.Grids.CellSelectionMode.Box

Component Overview

<SfTreeGrid DataSource="@TreeData"
            IdMapping="TaskId"
            ParentIdMapping="ParentId"
            TreeColumnIndex="1"
            AllowSorting="true"
            AllowFiltering="true"
            AllowPaging="true">
    <TreeGridColumns>
        <TreeGridColumn Field="TaskId" HeaderText="ID" Width="80" IsPrimaryKey="true" />
        <TreeGridColumn Field="TaskName" HeaderText="Task Name" Width="200" />
        <TreeGridColumn Field="Duration" HeaderText="Duration" Width="100" />
        <TreeGridColumn Field="Progress" HeaderText="Progress" Width="100" />
    </TreeGridColumns>
</SfTreeGrid>

Key concepts:

  • IdMapping — property name that uniquely identifies each row
  • ParentIdMapping — property name pointing to the parent row's ID (null/0 = root)
  • TreeColumnIndex — column index that shows the expand/collapse icon (0-based)

Navigation Guide

Setup & Getting Started

- NuGet install, _Imports.razor, Program.cs, theme/script setup, basic grid, IdMapping/ParentIdMapping/TreeColumnIndex, expand-collapse all, OnActionFailure

Data Binding

- Self-referential flat data, hierarchical nested children, remote URL/OData/Web API, SfDataManager, load on demand

- DataAdaptor override, Read/ReadAsync, Insert/Update/Delete, paging & sorting support, self-referential only

- Hot Chocolate server, GraphQLAdaptor, GraphQLAdaptorOptions, DataManagerRequestInput, CRUD mutations, cascading delete, CORS

Columns & Cells

- ColumnType, Format, TextAlign, frozen, reorder, resize, chooser, stacked headers, column menu, foreign key

- QueryCellInfo, CustomAttributes, ClipMode, GridLines, tooltips

Sorting, Filtering & Searching

- AllowSorting, multi-sort, SortComparer, SortColumnAsync, ClearSortingAsync, hierarchy preserved

- AllowFiltering, FilterType (FilterBar/Menu/Excel/CheckBox), hierarchy modes, operators, FilterByColumnAsync. ⚠️ See filtering.md for FilterTemplate rules

- Toolbar Search, SearchAsync, GridSearchSettings, hierarchy modes, highlight/clear

Editing

- Edit modes (Cell/Row/Dialog/Batch), edit types, command column, validation, template editing, EF Core. ⚠️ See editing.md for ValidationRules. Always add @using Syncfusion.Blazor.Grids when using <TreeGridEvents>

Rows & Selection

- RowDataBound, row/detail template, drag-and-drop, row height, row spanning

- Row/cell/both modes, checkbox column, toggle, drag select, programmatic selection, touch

Paging & Virtualization

- AllowPaging, TreeGridPageSettings, PageSize, pager position/template, programmatic navigation

- EnableVirtualization, EnableColumnVirtualization, vs. paging, limitations

Toolbar, Menus & Templates

- Built-in & custom items, EnableToolbarItemsAsync, OnToolbarClick

- ContextMenuItems, custom items, ContextMenuItemClicked, conditional show/hide

- Column/header/row/detail/toolbar templates, loading indicator

Exporting & Scrolling

- ExportToExcelAsync, ExportToPdfAsync, PrintAsync, custom data/headers, themes

- Frozen rows/columns (FrozenRows, IsFrozen, FreezeDirection), AllowFreezeLineMoving, EnableStickyHeader, ScrollIntoViewAsync

Advanced Features

- TreeGridAggregateColumn (Field+Type required), AggregateType, FooterTemplate, ShowChildSummary, custom LINQ, page-scope limitation

- Copy (Ctrl+C/Ctrl+Shift+H), CopyAsync, paste (Box+Batch), CopyHierarchyMode, BeforeCopyPaste

- EnableAutoFill + Cell/Box selection + Batch edit, limitations

- EnableAdaptiveUI, full-screen dialogs, vertical row mode

- EnablePersistence, persisted properties, manual state methods

Events

- TreeGridEvents<TValue>, OnActionBegin/OnActionComplete, RowDataBound, QueryCellInfo, cancel actions


Quick Start Example

1. Install NuGet: Syncfusion.Blazor.TreeGrid

2. Register in _Imports.razor:

@using Syncfusion.Blazor
@using Syncfusion.Blazor.TreeGrid

3. Add CSS in wwwroot/index.html or App.razor:

<link href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" />

4. Add to Program.cs:

builder.Services.AddSyncfusionBlazor();

5. Minimal component:

@using Syncfusion.Blazor.TreeGrid

<SfTreeGrid DataSource="@TreeData" IdMapping="Id" ParentIdMapping="ParentId" TreeColumnIndex="1">
    <TreeGridColumns>
        <TreeGridColumn Field="Id" HeaderText="ID" Width="80" IsPrimaryKey="true" />
        <TreeGridColumn Field="Name" HeaderText="Name" Width="200" />
        <TreeGridColumn Field="Status" HeaderText="Status" Width="120" />
    </TreeGridColumns>
</SfTreeGrid>

@code {
    public class TaskItem
    {
        public int Id { get; set; }
        public int? ParentId { get; set; }
        public string Name { get; set; }
        public string Status { get; set; }
    }

    private List<TaskItem> TreeData = new()
    {
        new TaskItem { Id = 1, ParentId = null, Name = "Project Alpha", Status = "In Progress" },
        new TaskItem { Id = 2, ParentId = 1,    Name = "Design Phase",  Status = "Done" },
        new TaskItem { Id = 3, ParentId = 1,    Name = "Development",   Status = "In Progress" },
        new TaskItem { Id = 4, ParentId = 3,    Name = "Backend API",   Status = "Pending" },
    };
}

Common Patterns

Full-Featured TreeGrid (Sorting + Filtering + Paging + Editing)

<SfTreeGrid @ref="TreeGridRef"
            DataSource="@TreeData"
            IdMapping="Id"
            ParentIdMapping="ParentId"
            TreeColumnIndex="1"
            AllowSorting="true"
            AllowFiltering="true"
            AllowPaging="true"
            Toolbar="@(new List<string> { "Add", "Edit", "Delete", "Update", "Cancel" })">
    <TreeGridEditSettings AllowAdding="true"
                          AllowEditing="true"
                          AllowDeleting="true"
                          Mode="Syncfusion.Blazor.TreeGrid.EditMode.Row" />
    <TreeGridPageSettings PageSize="10" />
    <TreeGridColumns>
        <TreeGridColumn Field="Id" IsPrimaryKey="true" Visible="false" />
        <TreeGridColumn Field="Name" HeaderText="Task" Width="220" />
        <TreeGridColumn Field="Duration" HeaderText="Days" Width="100" />
        <TreeGridColumn Field="Progress" HeaderText="%" Width="100" />
    </TreeGridColumns>
</SfTreeGrid>

@code {
    private SfTreeGrid<TaskItem> TreeGridRef;
    // ... data and model
}

Excel & PDF Export

<SfTreeGrid @ref="TreeGridRef" AllowExcelExport="true" AllowPdfExport="true"
            Toolbar="@(new List<string> { "ExcelExport", "PdfExport" })">
    <TreeGridEvents TValue="TaskItem" OnToolbarClick="ToolbarClickHandler" />
    ...
</SfTreeGrid>

@code {
    private SfTreeGrid<TaskItem> TreeGridRef;

    private async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
    {
        if (args.Item.Id.Contains("excelexport"))
            await TreeGridRef.ExportToExcelAsync();
        else if (args.Item.Id.Contains("pdfexport"))
            await TreeGridRef.ExportToPdfAsync();
    }
}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.02%
按下载量换算123

Claude

28.04%
按下载量换算86

Cursor

18.35%
按下载量换算56

Gemini CLI

8.8%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills