igniteui-cli 15.5.1 → 15.6.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.
- package/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +6 -3
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +30 -45
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +48 -96
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +61 -238
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +60 -193
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +36 -92
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +66 -224
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +39 -88
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +75 -152
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +40 -149
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +58 -243
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +89 -280
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +143 -431
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +91 -157
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +50 -228
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +61 -222
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +67 -360
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/grid-migration.md +55 -236
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +53 -202
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +31 -232
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +27 -119
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +88 -363
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +87 -415
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/SKILL.md +8 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-lite-testing/references/interop-contracts.md +42 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +83 -211
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +93 -184
- package/templates/react/igr-ts/projects/ai-config/files/skills/README.md +30 -83
- package/templates/react/igr-ts/projects/ai-config/files/skills/grid-lite-to-igr-grid-migration/SKILL.md +98 -191
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +38 -147
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENTS.md +65 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/DATAVIZ.md +90 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP.md +43 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +17 -145
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/USAGE.md +85 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +83 -135
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +51 -218
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +58 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +55 -154
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-optimize-bundle-size/SKILL.md +48 -401
- package/templates/webcomponents/igc-ts/constants.d.ts +5 -5
- package/templates/webcomponents/igc-ts/constants.js +5 -5
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +6 -6
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +0 -78
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +0 -81
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -398
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -161
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -72
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/INSTALLATION.md +0 -139
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -187
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -77
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -232
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -67
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -35
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -132
|
@@ -1,189 +1,123 @@
|
|
|
1
1
|
---
|
|
2
|
+
license: MIT
|
|
2
3
|
name: igniteui-blazor-grids
|
|
3
|
-
description: "
|
|
4
|
+
description: "All Ignite UI for Blazor data grids — Grid Lite, Flat Grid, Tree Grid, Hierarchical Grid, Pivot Grid: setup, columns and templates, sorting, filtering, selection, cell and row editing, grouping, summaries, toolbar, Excel/CSV export, paging, remote and server-side data, virtualization, sizing, state persistence, and migrating Grid Lite to IgbGrid. Use for grids, tables, tabular data, cell editing, row selection, column pinning or hiding, grouped rows, pivot tables, tree or hierarchical data, master-detail views, and grid export. For non-grid components use igniteui-blazor-components; for theming use igniteui-blazor-theming."
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
|
-
# Ignite UI for Blazor - Grids
|
|
8
|
+
# Ignite UI for Blazor - Data Grids
|
|
8
9
|
|
|
10
|
+
## How to use this skill
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
1. Pick the grid type from the [decision guide](#choosing-a-grid-type).
|
|
13
|
+
2. Read **every** reference file matching the request (in one parallel batch) — a request often spans several, e.g. remote paging plus editing needs `paging-remote.md` **and** `editing.md`.
|
|
14
|
+
3. If the `igniteui-cli` MCP server is available, call `get_doc(framework: "blazor", name: "<slug>")` for the grid and each feature, and `search_api` / `get_api_reference` for exact signatures. MCP output wins over this skill on any conflict.
|
|
15
|
+
4. Write code from what you read. Grid APIs differ sharply between Ignite UI's Angular, React, and Blazor products — do not carry syntax over from another framework, and say so plainly when something is not covered rather than guessing.
|
|
11
16
|
|
|
12
|
-
**
|
|
17
|
+
**Without the MCP server this skill still works** — the reference files are self-contained. Do not configure MCP unprompted; if the user wants it, see [MCP server (optional)](#mcp-server-optional).
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
> Grid APIs change significantly between versions. Anything generated without reading the reference files will be wrong.
|
|
19
|
+
### Routing table
|
|
16
20
|
|
|
17
|
-
|
|
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 |
|
|
21
|
+
| Task | Read |
|
|
41
22
|
|---|---|
|
|
42
|
-
|
|
|
43
|
-
| Grouping, summaries, cell merging, toolbar, export, virtualization
|
|
44
|
-
|
|
|
45
|
-
| Programmatic
|
|
46
|
-
| Cell editing, row editing, validation, custom editors | [`references/editing.md`](./references/editing.md) |
|
|
47
|
-
| Paging, remote data, server-side
|
|
48
|
-
| State persistence (IgbGridState
|
|
49
|
-
| Grid
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
23
|
+
| Quick start, columns, data types, cell/header/editor templates, column groups, multi-row layout, pinning, sorting UI, filtering UI, selection | [`references/structure.md`](./references/structure.md) |
|
|
24
|
+
| Grouping, summaries, cell merging, toolbar, Excel/CSV export, virtualization, row drag, action strip, master-detail, clipboard | [`references/features.md`](./references/features.md) |
|
|
25
|
+
| Grid Lite, Tree Grid, Hierarchical Grid, Pivot Grid specifics | [`references/types.md`](./references/types.md) |
|
|
26
|
+
| Programmatic sort / filter / group, `@ref` access, custom strategies | [`references/data-operations.md`](./references/data-operations.md) |
|
|
27
|
+
| Cell editing, row editing, validation, custom editors, add/delete rows | [`references/editing.md`](./references/editing.md) |
|
|
28
|
+
| Paging, remote data, server-side operations, virtual scrolling | [`references/paging-remote.md`](./references/paging-remote.md) |
|
|
29
|
+
| State persistence (`IgbGridState`, save/restore) | [`references/state.md`](./references/state.md) |
|
|
30
|
+
| Grid width/height, column sizing, row height, density | [`references/sizing.md`](./references/sizing.md) |
|
|
31
|
+
| Migrating `IgbGridLite` → `IgbGrid` | [`references/grid-migration.md`](./references/grid-migration.md) |
|
|
32
|
+
|
|
33
|
+
## Choosing a grid type
|
|
34
|
+
|
|
35
|
+
Ask in order:
|
|
36
|
+
|
|
37
|
+
1. **Read-only display** with sorting, filtering, and virtualization but no editing, selection, or paging → **`IgbGridLite`** (MIT, separate package).
|
|
38
|
+
2. **Pivot analytics** — rows/columns/values users can drag to reshape → **`IgbPivotGrid`**.
|
|
39
|
+
3. **Parent-child where each level has a different schema** (Companies → Departments → Employees) → **`IgbHierarchicalGrid`**.
|
|
40
|
+
4. **Parent-child within one schema** (`ManagerId` self-reference, or a nested children array) → **`IgbTreeGrid`**.
|
|
41
|
+
5. **Flat table needing enterprise features** (editing, grouping, paging, export) → **`IgbGrid`**.
|
|
42
|
+
|
|
43
|
+
When Grid Lite's capabilities run out, the upgrade path is always `IgbGrid` — never a non-grid component. See [`grid-migration.md`](./references/grid-migration.md).
|
|
44
|
+
|
|
45
|
+
| Grid | Module | Package |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `IgbGridLite` | No module registry required | `IgniteUI.Blazor.GridLite` (MIT) |
|
|
48
|
+
| `IgbGrid` | `IgbGridModule` | `IgniteUI.Blazor` / `.Trial` |
|
|
49
|
+
| `IgbTreeGrid` | `IgbTreeGridModule` | `IgniteUI.Blazor` / `.Trial` |
|
|
50
|
+
| `IgbHierarchicalGrid` | `IgbHierarchicalGridModule` | `IgniteUI.Blazor` / `.Trial` |
|
|
51
|
+
| `IgbPivotGrid` | `IgbPivotGridModule` | `IgniteUI.Blazor` / `.Trial` |
|
|
52
|
+
|
|
53
|
+
Grids are **not** included in `IgniteUI.Blazor.Lite`.
|
|
54
54
|
|
|
55
55
|
## Prerequisites
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
| Requirement | Details |
|
|
57
|
+
| Requirement | Value |
|
|
60
58
|
|---|---|
|
|
61
|
-
| .NET SDK | .
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
| CSS
|
|
66
|
-
|
|
|
67
|
-
| JS interop script | `<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>` in **index.html** or **_Host.cshtml** |
|
|
68
|
-
| 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) |
|
|
69
|
-
|
|
70
|
-
> **AGENT INSTRUCTION - MCP Server Setup (REQUIRED)**
|
|
71
|
-
>
|
|
72
|
-
> Before using any Ignite UI CLI MCP tools, you MUST verify the MCP server is available
|
|
73
|
-
> by calling `list_components(framework: "blazor", filter: "grid")` or `search_docs(framework: "blazor", query: "grid")`.
|
|
74
|
-
> 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).
|
|
75
|
-
>
|
|
76
|
-
> 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.
|
|
77
|
-
|
|
78
|
-
If these are not yet in place, read the `igniteui-blazor-components` skill's `references/setup.md` first.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Grid Selection Decision Guide
|
|
83
|
-
|
|
84
|
-
Ignite UI for Blazor has **five grid types**. Ask these questions in order:
|
|
59
|
+
| .NET SDK | 8.0 or later |
|
|
60
|
+
| Registration | `builder.Services.AddIgniteUIBlazor(typeof(IgbGridModule), …)` in `Program.cs` |
|
|
61
|
+
| Using directive | `@using IgniteUI.Blazor.Controls` in `_Imports.razor` |
|
|
62
|
+
| CSS — full grids | **both** `_content/IgniteUI.Blazor/themes/light/bootstrap.css` **and** `_content/IgniteUI.Blazor/themes/grid/light/bootstrap.css` |
|
|
63
|
+
| CSS — Grid Lite | `_content/IgniteUI.Blazor.GridLite/css/themes/light/bootstrap.css` only — not the two above |
|
|
64
|
+
| Script | `_content/IgniteUI.Blazor/app.bundle.js` before the Blazor framework script |
|
|
85
65
|
|
|
86
|
-
|
|
87
|
-
2. **Does the user need pivot-table analytics** (rows/columns/values/aggregations that users can drag-and-drop to reshape)? → **Pivot Grid** (`IgbPivotGrid`)
|
|
88
|
-
3. **Does the data have parent-child relationships where each level has a DIFFERENT schema** (e.g., Companies → Departments → Employees)? → **Hierarchical Grid** (`IgbHierarchicalGrid`)
|
|
89
|
-
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`)
|
|
90
|
-
5. **Is the data a flat list/table with enterprise features needed** (editing, grouping, paging, export, etc.)? → **Flat Grid** (`IgbGrid`)
|
|
66
|
+
The grid-specific stylesheet is easy to miss and is required whenever any full-featured grid is on the page. Full setup detail lives in the components skill's [`setup.md`](../igniteui-blazor-components/references/setup.md).
|
|
91
67
|
|
|
92
|
-
|
|
68
|
+
## Feature availability
|
|
93
69
|
|
|
94
|
-
|
|
95
|
-
> - Grid Lite: `.../components/grid-lite/{topic}`
|
|
96
|
-
> - Flat Grid: `.../components/grids/grid/{topic}`
|
|
97
|
-
> - Tree Grid: `.../components/grids/treegrid/{topic}`
|
|
98
|
-
> - Hierarchical Grid: `.../components/grids/hierarchicalgrid/{topic}`
|
|
99
|
-
> - Pivot Grid: `.../components/grids/pivotgrid/{topic}`
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Grid Types & Registration
|
|
104
|
-
|
|
105
|
-
| Grid Component | Module to Register | Package | Typical Use Case |
|
|
106
|
-
|---|---|---|---|
|
|
107
|
-
| `IgbGridLite` | `IgbGridLiteModule` | `IgniteUI.Blazor.GridLite` (MIT) | Read-only display with sorting, filtering, virtualization - no editing or selection |
|
|
108
|
-
| `IgbGrid` | `IgbGridModule` | `IgniteUI.Blazor` (Commercial) | Flat tabular data, master-detail, CRUD, dashboards |
|
|
109
|
-
| `IgbTreeGrid` | `IgbTreeGridModule` | `IgniteUI.Blazor` (Commercial) | Self-referencing tree data (org charts, file trees, BOM) |
|
|
110
|
-
| `IgbHierarchicalGrid` | `IgbHierarchicalGridModule` | `IgniteUI.Blazor` (Commercial) | Multi-schema parent-child relationships (customers → orders → line items) |
|
|
111
|
-
| `IgbPivotGrid` | `IgbPivotGridModule` | `IgniteUI.Blazor` (Commercial) | Pivot table analytics, aggregations across dimensions |
|
|
112
|
-
|
|
113
|
-
> **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`.
|
|
114
|
-
|
|
115
|
-
### Registration example
|
|
116
|
-
|
|
117
|
-
```csharp
|
|
118
|
-
// Program.cs - register only the modules you use
|
|
119
|
-
builder.Services.AddIgniteUIBlazor(
|
|
120
|
-
typeof(IgbGridLiteModule), // Grid Lite (IgniteUI.Blazor.GridLite package)
|
|
121
|
-
typeof(IgbGridModule), // Flat Grid
|
|
122
|
-
typeof(IgbTreeGridModule), // Tree Grid
|
|
123
|
-
typeof(IgbHierarchicalGridModule), // Hierarchical Grid
|
|
124
|
-
typeof(IgbPivotGridModule) // Pivot Grid
|
|
125
|
-
);
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Feature Availability per Grid Type
|
|
131
|
-
|
|
132
|
-
| Feature | IgbGridLite | IgbGrid | IgbTreeGrid | IgbHierarchicalGrid | IgbPivotGrid |
|
|
70
|
+
| Feature | GridLite | Grid | TreeGrid | HierarchicalGrid | PivotGrid |
|
|
133
71
|
|---|---|---|---|---|---|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
| Grouping | ❌ | ✅ **
|
|
140
|
-
| Summaries | ❌ | ✅ | ✅ | ✅ |
|
|
141
|
-
| Cell editing | ❌ | ✅ | ✅ | ✅ | ❌ (read-only) |
|
|
142
|
-
| Row editing | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
143
|
-
| Row adding | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
144
|
-
| Batch editing | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
72
|
+
| Sorting | ✅ | ✅ | ✅ | ✅ | dimension-based |
|
|
73
|
+
| Filtering | ✅ | ✅ | ✅ | ✅ | dimension-based |
|
|
74
|
+
| Column hiding / resizing | ✅ | ✅ | ✅ | ✅ | ❌ |
|
|
75
|
+
| Row / cell / column selection | ❌ | ✅ | ✅ (cascade) | ✅ | ❌ |
|
|
76
|
+
| Cell / row editing, row adding | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
77
|
+
| Grouping | ❌ | ✅ **only** | ❌ | ❌ | use dimensions |
|
|
78
|
+
| Summaries | ❌ | ✅ | ✅ | ✅ | built-in aggregations |
|
|
145
79
|
| Paging | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
146
|
-
| Column pinning | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
147
|
-
| Column hiding | ✅ | ✅ | ✅ | ✅ | ❌ |
|
|
148
|
-
| Column moving | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
149
|
-
| Column resizing | ✅ | ✅ | ✅ | ✅ | ❌ |
|
|
80
|
+
| Column pinning / moving | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
150
81
|
| Multi-column headers | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
151
82
|
| Row dragging | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
152
|
-
| Master-detail | ❌ | ✅ **
|
|
153
|
-
| Toolbar | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
154
|
-
|
|
|
83
|
+
| Master-detail | ❌ | ✅ **only** | ❌ | use `IgbRowIsland` | ❌ |
|
|
84
|
+
| Toolbar, Excel/CSV export | ❌ | ✅ | ✅ | ✅ | ❌ |
|
|
85
|
+
| Cell merging | ❌ | ✅ **only** | ❌ | ❌ | ❌ |
|
|
155
86
|
| State persistence | ❌ | ✅ | ✅ | ✅ | ✅ |
|
|
156
87
|
| Virtualization | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
| Remote data ops | `DataPipelineConfiguration` | Events + noop strategies | Events + noop strategies | Events + noop strategies | N/A |
|
|
88
|
+
| Load on demand | ❌ | ❌ | ✅ via `LoadChildrenOnDemandScript` | ✅ via `GridCreatedScript` | ❌ |
|
|
89
|
+
| Remote data ops | `DataPipelineConfiguration` | events + noop strategies | events + noop strategies | events + noop strategies | ❌ |
|
|
160
90
|
|
|
161
|
-
|
|
91
|
+
**Batch editing is not available in Blazor** on any grid type. Supported editing modes are cell editing and row editing only — never generate batch-editing code.
|
|
162
92
|
|
|
163
|
-
##
|
|
93
|
+
## Grid-wide rules
|
|
164
94
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
95
|
+
- **Set `PrimaryKey`.** Selection, editing, row-targeted APIs, and state persistence all depend on it.
|
|
96
|
+
- **Set `Height`.** Row virtualization only activates with a fixed height; without one every row renders to the DOM.
|
|
97
|
+
- **Prefer `AutoGenerate="false"`** so column order, types, and templates are explicit.
|
|
98
|
+
- **Set `DataType` on every column** — it drives the filter conditions, sort comparison, editor, and formatting.
|
|
99
|
+
- **`Data` must be a materialized collection** (`List<T>`, `T[]`), not `IQueryable` or JSON.
|
|
100
|
+
- **Use `@ref` for programmatic access**, and only after first render — the reference is `null` in `OnInitialized`.
|
|
101
|
+
- **Do not set column `Width` unless asked.** Without widths the grid distributes space proportionally and fills the container; fixed widths usually leave a gap on the right.
|
|
102
|
+
- Docs slugs follow `components/grid-lite/{topic}` and `components/grids/{grid|treegrid|hierarchicalgrid|pivotgrid}/{topic}`.
|
|
168
103
|
|
|
169
|
-
|
|
170
|
-
>
|
|
171
|
-
> Use `@ref` to obtain a C# reference to the grid, then call methods on it:
|
|
172
|
-
>
|
|
173
|
-
> ```razor
|
|
174
|
-
> <IgbGrid @ref="Grid" />
|
|
175
|
-
> @code { public IgbGrid Grid { get; set; } }
|
|
176
|
-
> ```
|
|
104
|
+
## MCP server (optional)
|
|
177
105
|
|
|
178
|
-
|
|
179
|
-
>
|
|
180
|
-
> 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.
|
|
106
|
+
`igniteui-cli` provides `list_components`, `get_doc`, `search_docs`, `search_api`, `get_api_reference`, all taking `framework: "blazor"`. To enable it, add to `.vscode/mcp.json` (VS Code, key `servers`):
|
|
181
107
|
|
|
182
|
-
|
|
108
|
+
```json
|
|
109
|
+
{ "servers": { "igniteui-cli": { "command": "npx", "args": ["-y", "igniteui-cli", "mcp"] } } }
|
|
110
|
+
```
|
|
183
111
|
|
|
184
|
-
|
|
112
|
+
Or `.cursor/mcp.json` / `claude_desktop_config.json` (key `mcpServers`):
|
|
185
113
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
114
|
+
```json
|
|
115
|
+
{ "mcpServers": { "igniteui-cli": { "command": "npx", "args": ["-y", "igniteui-cli", "mcp"] } } }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Reload the editor afterwards. JetBrains: **Settings → Tools → AI Assistant → MCP Servers**, command `npx`, arguments `igniteui-cli mcp`.
|
|
119
|
+
|
|
120
|
+
## Related skills
|
|
121
|
+
|
|
122
|
+
- [`igniteui-blazor-components`](../igniteui-blazor-components/SKILL.md) — every non-grid component, plus charts
|
|
123
|
+
- [`igniteui-blazor-theming`](../igniteui-blazor-theming/SKILL.md) — themes, palettes, design tokens
|
|
@@ -1,291 +1,113 @@
|
|
|
1
|
-
# Data Operations
|
|
1
|
+
# Data Operations — Programmatic Sorting, Filtering, Grouping
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> For grid setup and column configuration — see [`structure.md`](./structure.md).
|
|
3
|
+
Declarative sorting/filtering UI is in [`structure.md`](./structure.md).
|
|
5
4
|
|
|
6
|
-
##
|
|
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:
|
|
5
|
+
## Getting a grid reference
|
|
21
6
|
|
|
22
7
|
```razor
|
|
23
|
-
<IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
|
|
24
|
-
...
|
|
25
|
-
</IgbGrid>
|
|
8
|
+
<IgbGrid @ref="grid" Data="data" PrimaryKey="Id">…</IgbGrid>
|
|
26
9
|
|
|
27
10
|
@code {
|
|
28
|
-
private IgbGrid grid = default!;
|
|
11
|
+
private IgbGrid grid = default!; // or IgbTreeGrid / IgbHierarchicalGrid / IgbPivotGrid
|
|
29
12
|
}
|
|
30
13
|
```
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
---
|
|
15
|
+
The reference is `null` until after the first render — use it from event handlers or `OnAfterRenderAsync`, never `OnInitialized`. The declared type must match the component in markup.
|
|
35
16
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
### Sort a single column
|
|
17
|
+
## Sorting
|
|
39
18
|
|
|
40
19
|
```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
20
|
@code {
|
|
51
|
-
private
|
|
52
|
-
|
|
53
|
-
private async Task SortByName()
|
|
21
|
+
private Task SortByName() => grid.SortAsync(new IgbSortingExpression[]
|
|
54
22
|
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
new IgbSortingExpression
|
|
58
|
-
{
|
|
59
|
-
FieldName = "Name",
|
|
60
|
-
Dir = SortingDirection.Asc
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
23
|
+
new() { FieldName = "Name", Dir = SortingDirection.Asc }
|
|
24
|
+
});
|
|
64
25
|
|
|
65
|
-
private
|
|
26
|
+
private Task SortByDeptThenName() => grid.SortAsync(new IgbSortingExpression[]
|
|
66
27
|
{
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
{
|
|
71
|
-
FieldName = "Salary",
|
|
72
|
-
Dir = SortingDirection.Desc
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
28
|
+
new() { FieldName = "Department", Dir = SortingDirection.Asc },
|
|
29
|
+
new() { FieldName = "Name", Dir = SortingDirection.Asc }
|
|
30
|
+
});
|
|
76
31
|
|
|
77
|
-
private
|
|
78
|
-
{
|
|
79
|
-
await grid.ClearSortAsync();
|
|
80
|
-
}
|
|
32
|
+
private Task ClearSorting() => grid.ClearSortAsync();
|
|
81
33
|
}
|
|
82
34
|
```
|
|
83
35
|
|
|
84
|
-
|
|
36
|
+
Multi-column sort is a single call with several expressions.
|
|
85
37
|
|
|
86
|
-
|
|
38
|
+
## Filtering
|
|
87
39
|
|
|
88
|
-
|
|
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
|
|
40
|
+
Simple filters assign a `FilteringExpressionsTree`; the advanced dialog's state lives in `AdvancedFilteringExpressionsTree`.
|
|
106
41
|
|
|
107
42
|
```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
43
|
@code {
|
|
119
|
-
private
|
|
120
|
-
|
|
121
|
-
private void FilterSalaryAbove50k()
|
|
44
|
+
private void FilterHighEarners()
|
|
122
45
|
{
|
|
123
|
-
var tree = new IgbFilteringExpressionsTree
|
|
46
|
+
var tree = new IgbFilteringExpressionsTree { Operator = FilteringLogic.And };
|
|
124
47
|
tree.FilteringOperands = new IgbFilteringExpression[]
|
|
125
48
|
{
|
|
126
|
-
new
|
|
127
|
-
{
|
|
128
|
-
FieldName = "Salary",
|
|
129
|
-
ConditionName = "greaterThan",
|
|
130
|
-
SearchVal = 50000
|
|
131
|
-
}
|
|
49
|
+
new() { FieldName = "Salary", ConditionName = "greaterThan", SearchVal = 50000 }
|
|
132
50
|
};
|
|
133
51
|
grid.FilteringExpressionsTree = tree;
|
|
134
52
|
}
|
|
135
53
|
|
|
136
|
-
private
|
|
137
|
-
|
|
138
|
-
var tree = new IgbFilteringExpressionsTree() { Operator = FilteringLogic.And };
|
|
139
|
-
tree.FilteringOperands = new IgbFilteringExpression[]
|
|
140
|
-
{
|
|
141
|
-
new IgbFilteringExpression
|
|
142
|
-
{
|
|
143
|
-
FieldName = "IsActive",
|
|
144
|
-
ConditionName = "true",
|
|
145
|
-
SearchVal = true
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
grid.FilteringExpressionsTree = tree;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
private async Task ClearFilters()
|
|
152
|
-
{
|
|
153
|
-
await grid.ClearFilterAsync();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Clear filter on a single column
|
|
159
|
-
|
|
160
|
-
```razor
|
|
161
|
-
@code {
|
|
162
|
-
private async Task ClearNameFilter()
|
|
163
|
-
{
|
|
164
|
-
await grid.ClearFilterAsync("Name");
|
|
165
|
-
}
|
|
54
|
+
private Task ClearAll() => grid.ClearFilterAsync();
|
|
55
|
+
private Task ClearNameFilter() => grid.ClearFilterAsync("Name");
|
|
166
56
|
}
|
|
167
57
|
```
|
|
168
58
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
For AND/OR grouped conditions, build a `FilteringExpressionsTree`:
|
|
59
|
+
Nest trees for AND/OR groups — `FilteringOperands` accepts both expressions and nested trees:
|
|
172
60
|
|
|
173
61
|
```razor
|
|
174
62
|
@code {
|
|
175
|
-
private
|
|
63
|
+
private void ApplyComplexFilter()
|
|
176
64
|
{
|
|
177
|
-
|
|
65
|
+
// Department = "Engineering" AND (Salary > 80000 OR Title contains "Senior")
|
|
66
|
+
var salaryOrTitle = new IgbFilteringExpressionsTree { Operator = FilteringLogic.Or };
|
|
67
|
+
salaryOrTitle.FilteringOperands = new IgbFilteringExpression[]
|
|
178
68
|
{
|
|
179
|
-
FieldName = "
|
|
180
|
-
ConditionName = "
|
|
181
|
-
IgnoreCase = true,
|
|
182
|
-
SearchVal = "Engineering"
|
|
69
|
+
new() { FieldName = "Salary", ConditionName = "greaterThan", SearchVal = 80000 },
|
|
70
|
+
new() { FieldName = "Title", ConditionName = "contains", IgnoreCase = true, SearchVal = "Senior" }
|
|
183
71
|
};
|
|
184
72
|
|
|
185
|
-
var
|
|
73
|
+
var tree = new IgbFilteringExpressionsTree { Operator = FilteringLogic.And };
|
|
74
|
+
tree.FilteringOperands = new object[]
|
|
186
75
|
{
|
|
187
|
-
FieldName = "
|
|
188
|
-
|
|
189
|
-
SearchVal = 80000
|
|
76
|
+
new IgbFilteringExpression { FieldName = "Department", ConditionName = "equals", IgnoreCase = true, SearchVal = "Engineering" },
|
|
77
|
+
salaryOrTitle
|
|
190
78
|
};
|
|
191
79
|
|
|
192
|
-
var titleExpr = new IgbFilteringExpression
|
|
193
|
-
{
|
|
194
|
-
FieldName = "Title",
|
|
195
|
-
ConditionName = "contains",
|
|
196
|
-
IgnoreCase = true,
|
|
197
|
-
SearchVal = "Senior"
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
var salaryOrTitleGroup = new IgbFilteringExpressionsTree() { Operator = FilteringLogic.Or };
|
|
201
|
-
salaryOrTitleGroup.FilteringOperands = new IgbFilteringExpression[] { salaryExpr, titleExpr };
|
|
202
|
-
|
|
203
|
-
var tree = new IgbFilteringExpressionsTree() { Operator = FilteringLogic.And };
|
|
204
|
-
tree.FilteringOperands = new IgbFilteringExpression[] { deptExpr };
|
|
205
|
-
|
|
206
80
|
grid.AdvancedFilteringExpressionsTree = tree;
|
|
207
81
|
}
|
|
208
82
|
}
|
|
209
83
|
```
|
|
210
84
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
## Programmatic Grouping (IgbGrid Only)
|
|
85
|
+
`ConditionName` strings are camelCase and depend on the column's `DataType` — `"contains"`, `"startsWith"`, `"equals"`, `"greaterThan"`, `"before"`, `"true"`, `"empty"`, and so on. Confirm an unfamiliar one with `get_api_reference` rather than inventing it.
|
|
214
86
|
|
|
215
|
-
Grouping
|
|
216
|
-
|
|
217
|
-
### Group by a column
|
|
87
|
+
## Grouping — `IgbGrid` only
|
|
218
88
|
|
|
219
89
|
```razor
|
|
220
|
-
<IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
|
|
221
|
-
<IgbColumn Field="Department" Groupable="true" />
|
|
222
|
-
<IgbColumn Field="Name" />
|
|
223
|
-
<IgbColumn Field="Salary" DataType="GridColumnDataType.Number" />
|
|
224
|
-
</IgbGrid>
|
|
225
|
-
|
|
226
|
-
<IgbButton @onclick="GroupByDepartment">Group by Department</IgbButton>
|
|
227
|
-
<IgbButton @onclick="ClearGrouping">Clear Grouping</IgbButton>
|
|
228
|
-
|
|
229
90
|
@code {
|
|
230
|
-
private
|
|
231
|
-
|
|
232
|
-
private async Task GroupByDepartment()
|
|
91
|
+
private Task GroupByDepartment() => grid.GroupByAsync(new IgbGroupingExpression[]
|
|
233
92
|
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
new IgbGroupingExpression
|
|
237
|
-
{
|
|
238
|
-
FieldName = "Department",
|
|
239
|
-
Dir = SortingDirection.Asc
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
93
|
+
new() { FieldName = "Department", Dir = SortingDirection.Asc }
|
|
94
|
+
});
|
|
243
95
|
|
|
244
|
-
private
|
|
245
|
-
|
|
246
|
-
await grid.ClearGroupingAsync();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Clear grouping on a specific field
|
|
252
|
-
|
|
253
|
-
```razor
|
|
254
|
-
@code {
|
|
255
|
-
private async Task UngroupDepartment()
|
|
256
|
-
{
|
|
257
|
-
await grid.ClearGroupingAsync("Department");
|
|
258
|
-
}
|
|
96
|
+
private Task ClearGrouping() => grid.ClearGroupingAsync();
|
|
97
|
+
private Task UngroupDepartment() => grid.ClearGroupingAsync("Department");
|
|
259
98
|
}
|
|
260
99
|
```
|
|
261
100
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
| Event | Type | Description |
|
|
265
|
-
|---|---|---|
|
|
266
|
-
| `GroupingDone` | `EventCallback<IgbGroupingDoneEventArgs>` | Fires after grouping changes |
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Custom Sorting Strategy
|
|
271
|
-
|
|
272
|
-
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.
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## Custom Filtering Strategy
|
|
101
|
+
`GroupByAsync` on a Tree or Hierarchical grid reference fails — those types have no grouping.
|
|
277
102
|
|
|
278
|
-
|
|
103
|
+
## Custom strategies
|
|
279
104
|
|
|
280
|
-
|
|
105
|
+
Set `SortStrategy="typeof(YourStrategy)"` or `FilterStrategy="typeof(YourStrategy)"` on a column and implement the matching base class. Look up the exact base type and method signature with `get_api_reference` before writing it — these differ from the Angular and Web Components equivalents.
|
|
281
106
|
|
|
282
|
-
##
|
|
107
|
+
## Rules
|
|
283
108
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
6. **Hierarchical Grid levels are independent** - sorting/filtering the root does not affect child grids.
|
|
290
|
-
7. **Pivot Grid uses configuration** - sorting and filtering are managed through `IgbPivotConfiguration`, not through programmatic `SortAsync`/`FilterAsync`.
|
|
291
|
-
8. **`FieldName` is case-sensitive** - it must match the C# property name exactly.
|
|
109
|
+
- Every operation is asynchronous: `SortAsync`, `ClearSortAsync`, `ClearFilterAsync`, `GroupByAsync`, `ClearGroupingAsync`. Await them.
|
|
110
|
+
- `FieldName` is case-sensitive and must match the C# property name exactly.
|
|
111
|
+
- Tree Grid filtering is recursive — matches keep their ancestor rows so the hierarchy stays intact.
|
|
112
|
+
- Hierarchical Grid levels are independent; sorting or filtering the root does nothing to child grids.
|
|
113
|
+
- Pivot Grid sorting and filtering go through `IgbPivotConfiguration`, not these methods.
|