igniteui-cli 15.1.0-beta.0 → 15.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/lib/PromptSession.d.ts +4 -14
  2. package/lib/PromptSession.js +12 -96
  3. package/lib/cli.js +1 -9
  4. package/lib/commands/add.js +6 -6
  5. package/lib/commands/ai-config.d.ts +9 -3
  6. package/lib/commands/ai-config.js +150 -19
  7. package/lib/commands/build.js +2 -2
  8. package/lib/commands/generate.js +4 -4
  9. package/lib/commands/list.js +7 -6
  10. package/lib/commands/mcp.js +0 -1
  11. package/lib/commands/new.js +23 -10
  12. package/lib/commands/start.js +0 -1
  13. package/lib/commands/types.d.ts +0 -2
  14. package/lib/commands/upgrade.js +2 -2
  15. package/package.json +4 -4
  16. package/templates/blazor/igb/index.d.ts +1 -0
  17. package/templates/blazor/igb/index.js +12 -0
  18. package/templates/blazor/igb/projects/ai-config/files/AGENTS.md +65 -0
  19. package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +65 -0
  20. package/templates/blazor/igb/projects/ai-config/files/skills/README.md +61 -0
  21. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +118 -0
  22. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +302 -0
  23. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +350 -0
  24. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +178 -0
  25. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +365 -0
  26. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +180 -0
  27. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +322 -0
  28. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +78 -0
  29. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +214 -0
  30. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +284 -0
  31. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +281 -0
  32. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +503 -0
  33. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +188 -0
  34. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +264 -0
  35. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +297 -0
  36. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +447 -0
  37. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +78 -0
  38. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +299 -0
  39. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +284 -0
  40. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +160 -0
  41. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +497 -0
  42. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +553 -0
  43. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +259 -0
  44. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +276 -0
  45. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +81 -0
  46. package/templates/blazor/igb/projects/ai-config/index.d.ts +22 -0
  47. package/templates/blazor/igb/projects/ai-config/index.js +62 -0
  48. package/templates/blazor/index.d.ts +3 -0
  49. package/templates/blazor/index.js +11 -0
  50. package/templates/react/igr-ts/grid/basic/index.js +1 -1
  51. package/templates/react/igr-ts/grid/index.js +2 -2
  52. package/templates/react/igr-ts/projects/_base/files/package.json +1 -1
  53. package/templates/react/igr-ts/projects/ai-config/index.d.ts +22 -0
  54. package/templates/react/igr-ts/projects/ai-config/index.js +74 -0
  55. package/templates/webcomponents/igc-ts/dock-manager/default/index.js +1 -1
  56. package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
  57. package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +2 -2
  58. package/templates/webcomponents/igc-ts/projects/ai-config/index.d.ts +22 -0
  59. package/templates/webcomponents/igc-ts/projects/ai-config/index.js +62 -0
  60. package/templates/react/igr-ts/projects/_base/files/__dot__claude/CLAUDE.md +0 -3
  61. package/templates/react/igr-ts/projects/_base/files/__dot__github/copilot-instructions.md +0 -3
  62. package/templates/webcomponents/igc-ts/projects/_base/files/__dot__claude/CLAUDE.md +0 -3
  63. package/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/copilot-instructions.md +0 -3
  64. /package/templates/react/igr-ts/projects/{_base → ai-config}/files/AGENTS.md +0 -0
  65. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/README.md +0 -0
  66. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/SKILL.md +0 -0
  67. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -0
  68. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -0
  69. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -0
  70. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/INSTALLATION.md +0 -0
  71. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -0
  72. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -0
  73. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -0
  74. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +0 -0
  75. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/SKILL.md +0 -0
  76. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +0 -0
  77. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -0
  78. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -0
  79. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/SKILL.md +0 -0
  80. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -0
  81. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +0 -0
  82. /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-optimize-bundle-size/SKILL.md +0 -0
  83. /package/templates/webcomponents/igc-ts/projects/{_base → ai-config}/files/AGENTS.md +0 -0
  84. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/README.md +0 -0
  85. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-choose-components/SKILL.md +0 -0
  86. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-choose-components/reference/mcp-setup.md +0 -0
  87. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-customize-component-theme/SKILL.md +0 -0
  88. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/SKILL.md +0 -0
  89. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +0 -0
  90. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +0 -0
  91. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/SKILL.md +0 -0
  92. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/angular.md +0 -0
  93. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/react.md +0 -0
  94. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/vanilla-js.md +0 -0
  95. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/vue.md +0 -0
  96. /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-optimize-bundle-size/SKILL.md +0 -0
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: igniteui-blazor-grids
3
+ description: "Provides guidance on all Ignite UI for Blazor data grid types (Grid Lite, Flat Grid, Tree Grid, Hierarchical Grid, Pivot Grid) including setup, column configuration, sorting, filtering, selection, editing, grouping, summaries, toolbar, export, paging, remote data, and state persistence. Use when users ask about grids, tables, data grids, tabular data display, cell editing, row selection, column pinning, column hiding, grouping rows, pivot tables, tree-structured data, hierarchical data, master-detail views, read-only data display, or exporting grid data. Do NOT use for non-grid UI components (forms, dialogs, navigation, charts) - use igniteui-blazor-components instead. Do NOT use for theming or styling - use igniteui-blazor-theming instead."
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Ignite UI for Blazor - Grids Skill
8
+
9
+
10
+ ## MANDATORY AGENT PROTOCOL - YOU MUST FOLLOW THIS BEFORE PRODUCING ANY OUTPUT
11
+
12
+ **This file is a routing hub only. It contains NO code examples and NO API details.**
13
+
14
+ > **DO NOT write any code, component parameters, event names, or property names from memory.**
15
+ > Grid APIs change significantly between versions. Anything generated without reading the reference files will be wrong.
16
+
17
+ You are **required** to complete ALL of the following steps before producing any grid-related code or answer:
18
+
19
+ **STEP 1 - Identify the grid type.**
20
+ Use the Grid Selection Decision Guide below. If the grid type is not explicitly stated, infer it from context or ask.
21
+
22
+ **STEP 2 - Identify every task category involved.**
23
+ Map the user's request to one or more rows in the Task → Reference File table below. A single request often spans multiple categories (e.g., remote paging AND editing requires reading both `paging-remote.md` AND `editing.md`).
24
+
25
+ **STEP 3 - Read every identified reference file in full (PARALLEL).**
26
+ Call `read_file` (or equivalent) on **all** reference files identified in Step 2 **in a single parallel batch** - do NOT read them one at a time sequentially. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
27
+
28
+ **STEP 4 - Extract doc slugs, then call `get_doc` and API tools for the relevant grid and each feature.**
29
+ Use the Ignite UI MCP `get_doc` tool with `framework: "blazor"` and the exact doc slug listed in the reference files you just read. It returns the relevant grid docs, examples, and feature guidance. Do NOT skip this step.
30
+
31
+ If a reference file does not list a slug for the requested grid feature, call `search_docs(framework: "blazor", query: "<grid feature>")` to find the correct doc. If no Blazor doc exists, say that the feature is not covered rather than guessing.
32
+
33
+ Use `search_api` and `get_api_reference` for Blazor grid API details when property names, methods, events, enums, or signatures are needed.
34
+
35
+ **STEP 5 - Only then produce output.**
36
+ Base your code and explanation exclusively on what you read in Steps 3–4. If the reference files or MCP docs do not cover something, say so explicitly rather than guessing.
37
+
38
+ ### Task → Reference File
39
+
40
+ | Task | Reference file |
41
+ |---|---|
42
+ | Grid type selection, quick start, column configuration, column templates, column groups, multi-row layout, pinning, sorting UI, filtering UI, selection | [`references/structure.md`](./references/structure.md) |
43
+ | Grouping, summaries, cell merging, toolbar, export, virtualization & performance, row drag, action strip, master-detail, clipboard | [`references/features.md`](./references/features.md) |
44
+ | Tree Grid specifics, Hierarchical Grid specifics, Grid Lite setup, Grid Lite data operations, Pivot Grid setup | [`references/types.md`](./references/types.md) |
45
+ | Programmatic sorting / filtering / grouping, `@ref` access, custom strategies | [`references/data-operations.md`](./references/data-operations.md) |
46
+ | Cell editing, row editing, validation, custom editors | [`references/editing.md`](./references/editing.md) |
47
+ | Paging, remote data, server-side ops, noop strategies, virtual scroll, multi-grid coordination | [`references/paging-remote.md`](./references/paging-remote.md) |
48
+ | State persistence (IgbGridState, feature serialization, save/restore per grid type) | [`references/state.md`](./references/state.md) |
49
+ | Grid sizing (width, height, column sizing, null/px/% modes, cell spacing CSS variables) | [`references/sizing.md`](./references/sizing.md) |
50
+
51
+ > **When in doubt, read more rather than fewer reference files.** The cost of an unnecessary file read is negligible; the cost of hallucinated API usage is a broken application.
52
+
53
+ ---
54
+
55
+ ## Prerequisites
56
+
57
+ Before using any Ignite UI for Blazor grid component you must have:
58
+
59
+ | Requirement | Details |
60
+ |---|---|
61
+ | .NET SDK | .NET 8+, 9+, or 10+ |
62
+ | NuGet package | `IgniteUI.Blazor` (licensed) for all full-featured grids; `IgniteUI.Blazor.GridLite` (MIT, separate NuGet) for Grid Lite only - grids are **not** included in `IgniteUI.Blazor.Lite` |
63
+ | Service registration | `builder.Services.AddIgniteUIBlazor(typeof(IgbGridModule), ...)` in **Program.cs** with required module types |
64
+ | Using directive | `@using IgniteUI.Blazor.Controls` in **_Imports.razor** |
65
+ | CSS theme | `<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />` in **index.html** or **_Host.cshtml** |
66
+ | JS interop script | `<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>` in **index.html** or **_Host.cshtml** |
67
+ | Ignite UI CLI MCP | The **Ignite UI CLI MCP server** (`igniteui-cli`) available as a tool provider - see [`references/mcp-setup.md`](./references/mcp-setup.md) |
68
+
69
+ > **AGENT INSTRUCTION - MCP Server Setup (REQUIRED)**
70
+ >
71
+ > Before using any Ignite UI CLI MCP tools, you MUST verify the MCP server is available
72
+ > by calling `list_components(framework: "blazor", filter: "grid")` or `search_docs(framework: "blazor", query: "grid")`.
73
+ > If the tool is not available or the call fails, you MUST automatically configure it by following the setup steps in [`references/mcp-setup.md`](./references/mcp-setup.md).
74
+ >
75
+ > After writing the file, inform the user that the MCP server has been configured and they may need to reload the editor for the tools to activate. Do NOT skip this step or ask the user to do it manually.
76
+
77
+ If these are not yet in place, read the `igniteui-blazor-components` skill's `references/setup.md` first.
78
+
79
+ ---
80
+
81
+ ## Grid Selection Decision Guide
82
+
83
+ Ignite UI for Blazor has **five grid types**. Ask these questions in order:
84
+
85
+ 1. **Does the user need a lightweight, read-only data display** with sorting, filtering, and virtualization but no editing, selection, or paging? → **Grid Lite** (`IgbGridLite`, MIT licensed, separate `IgniteUI.Blazor.GridLite` package). **If the user later needs features beyond Grid Lite's capabilities, upgrade strictly to `IgbGrid`** - never recommend non-grid components as a substitute.
86
+ 2. **Does the user need pivot-table analytics** (rows/columns/values/aggregations that users can drag-and-drop to reshape)? → **Pivot Grid** (`IgbPivotGrid`)
87
+ 3. **Does the data have parent-child relationships where each level has a DIFFERENT schema** (e.g., Companies → Departments → Employees)? → **Hierarchical Grid** (`IgbHierarchicalGrid`)
88
+ 4. **Does the data have parent-child relationships within a SINGLE schema** (e.g., Employees with a `ManagerId` field, or nested children arrays)? → **Tree Grid** (`IgbTreeGrid`)
89
+ 5. **Is the data a flat list/table with enterprise features needed** (editing, grouping, paging, export, etc.)? → **Flat Grid** (`IgbGrid`)
90
+
91
+ After choosing the grid type, **you must still complete Steps 2–5 from the mandatory protocol above** - return to the routing table and read every applicable `references/` file before writing any code.
92
+
93
+ > **AGENT INSTRUCTION - Documentation URL Pattern**: For grid-specific topics (sorting, filtering, editing, paging, etc.), docs URLs follow this naming pattern per grid type:
94
+ > - Grid Lite: `.../components/grid-lite/{topic}`
95
+ > - Flat Grid: `.../components/grids/grid/{topic}`
96
+ > - Tree Grid: `.../components/grids/treegrid/{topic}`
97
+ > - Hierarchical Grid: `.../components/grids/hierarchicalgrid/{topic}`
98
+ > - Pivot Grid: `.../components/grids/pivotgrid/{topic}`
99
+
100
+ ---
101
+
102
+ ## Grid Types & Registration
103
+
104
+ | Grid Component | Module to Register | Package | Typical Use Case |
105
+ |---|---|---|---|
106
+ | `IgbGridLite` | `IgbGridLiteModule` | `IgniteUI.Blazor.GridLite` (MIT) | Read-only display with sorting, filtering, virtualization - no editing or selection |
107
+ | `IgbGrid` | `IgbGridModule` | `IgniteUI.Blazor` (Commercial) | Flat tabular data, master-detail, CRUD, dashboards |
108
+ | `IgbTreeGrid` | `IgbTreeGridModule` | `IgniteUI.Blazor` (Commercial) | Self-referencing tree data (org charts, file trees, BOM) |
109
+ | `IgbHierarchicalGrid` | `IgbHierarchicalGridModule` | `IgniteUI.Blazor` (Commercial) | Multi-schema parent-child relationships (customers → orders → line items) |
110
+ | `IgbPivotGrid` | `IgbPivotGridModule` | `IgniteUI.Blazor` (Commercial) | Pivot table analytics, aggregations across dimensions |
111
+
112
+ > **AGENT INSTRUCTION - Grid Lite upgrade path**: When a user is working with `IgbGridLite` and their requirements exceed Grid Lite's capabilities (editing, selection, paging, grouping, summaries, export), you **MUST** recommend upgrading to `IgbGrid` from the `IgniteUI.Blazor` package. Never suggest a different component type - the upgrade path from Grid Lite is always to `IgbGrid`.
113
+
114
+ ### Registration example
115
+
116
+ ```csharp
117
+ // Program.cs - register only the modules you use
118
+ builder.Services.AddIgniteUIBlazor(
119
+ typeof(IgbGridLiteModule), // Grid Lite (IgniteUI.Blazor.GridLite package)
120
+ typeof(IgbGridModule), // Flat Grid
121
+ typeof(IgbTreeGridModule), // Tree Grid
122
+ typeof(IgbHierarchicalGridModule), // Hierarchical Grid
123
+ typeof(IgbPivotGridModule) // Pivot Grid
124
+ );
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Feature Availability per Grid Type
130
+
131
+ | Feature | IgbGridLite | IgbGrid | IgbTreeGrid | IgbHierarchicalGrid | IgbPivotGrid |
132
+ |---|---|---|---|---|---|
133
+ | Column sorting | ✅ | ✅ | ✅ | ✅ | ✅ (dimension-based) |
134
+ | Column filtering | ✅ | ✅ | ✅ | ✅ | ✅ (dimension-based) |
135
+ | Row selection | ❌ | ✅ | ✅ (cascade) | ✅ | ❌ |
136
+ | Cell selection | ❌ | ✅ | ✅ | ✅ | ❌ |
137
+ | Column selection | ❌ | ✅ | ✅ | ✅ | ❌ |
138
+ | Grouping | ❌ | ✅ **Exclusive** | ❌ | ❌ | N/A (use dimensions) |
139
+ | Summaries | ❌ | ✅ | ✅ | ✅ | N/A (built-in aggregations) |
140
+ | Cell editing | ❌ | ✅ | ✅ | ✅ | ❌ (read-only) |
141
+ | Row editing | ❌ | ✅ | ✅ | ✅ | ❌ |
142
+ | Row adding | ❌ | ✅ | ✅ | ✅ | ❌ |
143
+ | Batch editing | ❌ | ❌ | ❌ | ❌ | ❌ |
144
+ | Paging | ❌ | ✅ | ✅ | ✅ | ❌ |
145
+ | Column pinning | ❌ | ✅ | ✅ | ✅ | ❌ |
146
+ | Column hiding | ✅ | ✅ | ✅ | ✅ | ❌ |
147
+ | Column moving | ❌ | ✅ | ✅ | ✅ | ❌ |
148
+ | Column resizing | ✅ | ✅ | ✅ | ✅ | ❌ |
149
+ | Multi-column headers | ❌ | ✅ | ✅ | ✅ | ❌ |
150
+ | Row dragging | ❌ | ✅ | ✅ | ✅ | ❌ |
151
+ | Master-detail | ❌ | ✅ **Exclusive** | ❌ | N/A (use RowIsland) | ❌ |
152
+ | Toolbar | ❌ | ✅ | ✅ | ✅ | ❌ |
153
+ | Export (Excel/CSV) | ❌ | ✅ | ✅ | ✅ | ❌ |
154
+ | State persistence | ❌ | ✅ | ✅ | ✅ | ✅ |
155
+ | Virtualization | ✅ | ✅ | ✅ | ✅ | ✅ |
156
+ | Cell merging | ❌ | ✅ | ❌ | ❌ | ❌ |
157
+ | Load on demand | ❌ | ❌ | ✅ **Exclusive** | ❌ | ❌ |
158
+ | Remote data ops | `DataPipelineConfiguration` | Events + noop strategies | Events + noop strategies | Events + noop strategies | N/A |
159
+
160
+ ---
161
+
162
+ ## Key Blazor-Specific Notes
163
+
164
+ > **AGENT INSTRUCTION - Blazor API Lookup**
165
+ >
166
+ > Use `search_api` and `get_api_reference` for Blazor grid property names, event names, method signatures, enums, and related API details.
167
+
168
+ > **AGENT INSTRUCTION - `@ref` for programmatic access**
169
+ >
170
+ > Use `@ref` to obtain a C# reference to the grid, then call methods on it:
171
+ >
172
+ > ```razor
173
+ > <IgbGrid @ref="Grid" />
174
+ > @code { public IgbGrid Grid { get; set; } }
175
+ > ```
176
+
177
+ > **AGENT INSTRUCTION - Batch Editing is NOT available for Blazor**
178
+ >
179
+ > The Ignite UI for Blazor grid does **not** support batch editing. Supported editing modes are Cell editing and Row editing only. Do not suggest or generate batch editing code.
180
+
181
+ ---
182
+
183
+ ## Related Skills
184
+
185
+ | Skill | Use for |
186
+ |---|---|
187
+ | `igniteui-blazor-components` | All non-grid `IgniteUI.Blazor.Lite` components (forms, layout, data display, feedback) and visualizations/charts available in `IgniteUI.Blazor` |
188
+ | `igniteui-blazor-theming` | CSS custom properties, palettes, typography, theme switching, dark/light mode |
@@ -0,0 +1,264 @@
1
+ # Data Operations - Programmatic Sorting, Filtering, Grouping & Custom Strategies
2
+
3
+ > **Part of the [`igniteui-blazor-grids`](../SKILL.md) skill hub.**
4
+ > For grid setup and column configuration — see [`structure.md`](./structure.md).
5
+
6
+ ## Contents
7
+
8
+ - [Accessing Grid Instances via `@ref`](#accessing-grid-instances-via-ref)
9
+ - [Programmatic Sorting](#programmatic-sorting)
10
+ - [Programmatic Filtering](#programmatic-filtering)
11
+ - [Programmatic Grouping (IgbGrid Only)](#programmatic-grouping-igbgrid-only)
12
+ - [Custom Sorting Strategy](#custom-sorting-strategy)
13
+ - [Custom Filtering Strategy](#custom-filtering-strategy)
14
+ - [Key Rules](#key-rules)
15
+
16
+ ---
17
+
18
+ ## Accessing Grid Instances via `@ref`
19
+
20
+ Use `@ref` to get a typed component reference for programmatic API calls. Declare with the matching type (`IgbGrid`, `IgbTreeGrid`, `IgbHierarchicalGrid`, or `IgbPivotGrid`) and access only after render:
21
+
22
+ ```razor
23
+ <IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
24
+ ...
25
+ </IgbGrid>
26
+
27
+ @code {
28
+ private IgbGrid grid = default!;
29
+ }
30
+ ```
31
+
32
+ > **Important:** The reference is `null` until after the component renders. Use it in event handlers or `OnAfterRenderAsync`, not in `OnInitialized`.
33
+
34
+ ---
35
+
36
+ ## Programmatic Sorting
37
+
38
+ ### Sort a single column
39
+
40
+ ```razor
41
+ <IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
42
+ <IgbColumn Field="Name" Sortable="true" />
43
+ <IgbColumn Field="Salary" Sortable="true" DataType="GridColumnDataType.Number" />
44
+ </IgbGrid>
45
+
46
+ <IgbButton @onclick="SortByName">Sort by Name (A-Z)</IgbButton>
47
+ <IgbButton @onclick="SortBySalaryDesc">Sort by Salary (High-Low)</IgbButton>
48
+ <IgbButton @onclick="ClearSorting">Clear Sorting</IgbButton>
49
+
50
+ @code {
51
+ private IgbGrid grid = default!;
52
+
53
+ private async Task SortByName()
54
+ {
55
+ await grid.SortAsync(new IgbSortingExpression[]
56
+ {
57
+ new IgbSortingExpression
58
+ {
59
+ FieldName = "Name",
60
+ Dir = SortingDirection.Asc
61
+ }
62
+ });
63
+ }
64
+
65
+ private async Task SortBySalaryDesc()
66
+ {
67
+ await grid.SortAsync(new IgbSortingExpression[]
68
+ {
69
+ new IgbSortingExpression
70
+ {
71
+ FieldName = "Salary",
72
+ Dir = SortingDirection.Desc
73
+ }
74
+ });
75
+ }
76
+
77
+ private async Task ClearSorting()
78
+ {
79
+ await grid.ClearSortAsync();
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### Multi-column sort
85
+
86
+ Pass multiple expressions in a single call:
87
+
88
+ ```razor
89
+ @code {
90
+ private async Task SortMultiple()
91
+ {
92
+ await grid.SortAsync(new IgbSortingExpression[]
93
+ {
94
+ new IgbSortingExpression { FieldName = "Department", Dir = SortingDirection.Asc },
95
+ new IgbSortingExpression { FieldName = "Name", Dir = SortingDirection.Asc }
96
+ });
97
+ }
98
+ }
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Programmatic Filtering
104
+
105
+ ### Filter a column
106
+
107
+ ```razor
108
+ <IgbGrid @ref="grid" Data="data" PrimaryKey="Id" AllowFiltering="true">
109
+ <IgbColumn Field="Name" Filterable="true" DataType="GridColumnDataType.String" />
110
+ <IgbColumn Field="Salary" Filterable="true" DataType="GridColumnDataType.Number" />
111
+ <IgbColumn Field="IsActive" Filterable="true" DataType="GridColumnDataType.Boolean" />
112
+ </IgbGrid>
113
+
114
+ <IgbButton @onclick="FilterSalaryAbove50k">High Earners</IgbButton>
115
+ <IgbButton @onclick="FilterActiveEmployees">Active Only</IgbButton>
116
+ <IgbButton @onclick="ClearFilters">Clear All Filters</IgbButton>
117
+
118
+ @code {
119
+ private IgbGrid grid = default!;
120
+
121
+ private async Task FilterSalaryAbove50k()
122
+ {
123
+ await grid.FilterAsync("Salary", 50000, IgbFilteringCondition.GreaterThan);
124
+ }
125
+
126
+ private async Task FilterActiveEmployees()
127
+ {
128
+ await grid.FilterAsync("IsActive", true, IgbFilteringCondition.True);
129
+ }
130
+
131
+ private async Task ClearFilters()
132
+ {
133
+ await grid.ClearFilterAsync();
134
+ }
135
+ }
136
+ ```
137
+
138
+ ### Clear filter on a single column
139
+
140
+ ```razor
141
+ @code {
142
+ private async Task ClearNameFilter()
143
+ {
144
+ await grid.ClearFilterAsync("Name");
145
+ }
146
+ }
147
+ ```
148
+
149
+ ### Complex filtering with FilteringExpressionsTree
150
+
151
+ For AND/OR grouped conditions, build a `FilteringExpressionsTree`:
152
+
153
+ ```razor
154
+ @code {
155
+ private async Task ApplyComplexFilter()
156
+ {
157
+ var tree = new IgbFilteringExpressionsTree(FilteringLogic.And);
158
+
159
+ tree.FilteringOperands.Add(new IgbFilteringExpression
160
+ {
161
+ FieldName = "Department",
162
+ Condition = IgbFilteringCondition.Equals,
163
+ SearchVal = "Engineering"
164
+ });
165
+
166
+ var salaryGroup = new IgbFilteringExpressionsTree(FilteringLogic.Or);
167
+ salaryGroup.FilteringOperands.Add(new IgbFilteringExpression
168
+ {
169
+ FieldName = "Salary",
170
+ Condition = IgbFilteringCondition.GreaterThan,
171
+ SearchVal = 80000
172
+ });
173
+ salaryGroup.FilteringOperands.Add(new IgbFilteringExpression
174
+ {
175
+ FieldName = "Title",
176
+ Condition = IgbFilteringCondition.Contains,
177
+ SearchVal = "Senior"
178
+ });
179
+
180
+ tree.FilteringOperands.Add(salaryGroup);
181
+
182
+ grid.AdvancedFilteringExpressionsTree = tree;
183
+ }
184
+ }
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Programmatic Grouping (IgbGrid Only)
190
+
191
+ Grouping is exclusive to the flat grid. Tree Grid and Hierarchical Grid do not support grouping.
192
+
193
+ ### Group by a column
194
+
195
+ ```razor
196
+ <IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
197
+ <IgbColumn Field="Department" Groupable="true" />
198
+ <IgbColumn Field="Name" />
199
+ <IgbColumn Field="Salary" DataType="GridColumnDataType.Number" />
200
+ </IgbGrid>
201
+
202
+ <IgbButton @onclick="GroupByDepartment">Group by Department</IgbButton>
203
+ <IgbButton @onclick="ClearGrouping">Clear Grouping</IgbButton>
204
+
205
+ @code {
206
+ private IgbGrid grid = default!;
207
+
208
+ private async Task GroupByDepartment()
209
+ {
210
+ await grid.GroupByAsync(new IgbGroupingExpression
211
+ {
212
+ FieldName = "Department",
213
+ Dir = SortingDirection.Asc
214
+ });
215
+ }
216
+
217
+ private async Task ClearGrouping()
218
+ {
219
+ await grid.ClearGroupingAsync();
220
+ }
221
+ }
222
+ ```
223
+
224
+ ### Clear grouping on a specific field
225
+
226
+ ```razor
227
+ @code {
228
+ private async Task UngroupDepartment()
229
+ {
230
+ await grid.ClearGroupingAsync("Department");
231
+ }
232
+ }
233
+ ```
234
+
235
+ ### Grouping events
236
+
237
+ | Event | Type | Description |
238
+ |---|---|---|
239
+ | `GroupingDone` | `EventCallback<IgbGroupingDoneEventArgs>` | Fires after grouping changes |
240
+
241
+ ---
242
+
243
+ ## Custom Sorting Strategy
244
+
245
+ Add `SortStrategy="typeof(YourStrategy)"` to a column and implement a class that extends `IgbSortingStrategy`, overriding `Compare`. Use `get_api_reference` to find the exact base class and method signature.
246
+
247
+ ---
248
+
249
+ ## Custom Filtering Strategy
250
+
251
+ Add `FilterStrategy="typeof(YourStrategy)"` to a column and implement a class that provides custom filter logic. Use `get_api_reference` to find the exact interface and method signatures.
252
+
253
+ ---
254
+
255
+ ## Key Rules
256
+
257
+ 1. **All async methods need `await`** - `SortAsync`, `FilterAsync`, `GroupByAsync`, `ClearSortAsync`, `ClearFilterAsync`, `ClearGroupingAsync` are all asynchronous.
258
+ 2. **`@ref` requires correct type** - use `IgbGrid`, `IgbTreeGrid`, `IgbHierarchicalGrid`, or `IgbPivotGrid` to match the component in markup.
259
+ 3. **Access `@ref` only after render** - the reference is `null` until the component renders. Use it in event handlers or `OnAfterRenderAsync`, not in `OnInitialized`.
260
+ 4. **Grouping is IgbGrid only** - calling `GroupByAsync` on a Tree Grid or Hierarchical Grid reference will fail.
261
+ 5. **Tree Grid filtering is recursive** - filtering finds matching rows and all their ancestor rows, preserving the tree structure.
262
+ 6. **Hierarchical Grid levels are independent** - sorting/filtering the root does not affect child grids.
263
+ 7. **Pivot Grid uses configuration** - sorting and filtering are managed through `IgbPivotConfiguration`, not through programmatic `SortAsync`/`FilterAsync`.
264
+ 8. **`FieldName` is case-sensitive** - it must match the C# property name exactly.