igniteui-cli 15.1.0 → 15.2.1-alpha.3

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 (40) hide show
  1. package/lib/PromptSession.d.ts +1 -1
  2. package/lib/PromptSession.js +2 -2
  3. package/lib/commands/ai-config.d.ts +3 -5
  4. package/lib/commands/ai-config.js +68 -23
  5. package/lib/commands/new.js +1 -1
  6. package/package.json +4 -4
  7. package/templates/blazor/igb/index.d.ts +1 -0
  8. package/templates/blazor/igb/index.js +12 -0
  9. package/templates/blazor/igb/projects/ai-config/files/AGENTS.md +65 -0
  10. package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +65 -0
  11. package/templates/blazor/igb/projects/ai-config/files/skills/README.md +61 -0
  12. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +118 -0
  13. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +302 -0
  14. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +350 -0
  15. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +178 -0
  16. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +365 -0
  17. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +180 -0
  18. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +322 -0
  19. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +78 -0
  20. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +214 -0
  21. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +284 -0
  22. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +281 -0
  23. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +503 -0
  24. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +188 -0
  25. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +264 -0
  26. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +297 -0
  27. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +447 -0
  28. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +78 -0
  29. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +299 -0
  30. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +284 -0
  31. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +160 -0
  32. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +497 -0
  33. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +553 -0
  34. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +259 -0
  35. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +276 -0
  36. package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +81 -0
  37. package/templates/blazor/igb/projects/ai-config/index.d.ts +22 -0
  38. package/templates/blazor/igb/projects/ai-config/index.js +62 -0
  39. package/templates/blazor/index.d.ts +3 -0
  40. package/templates/blazor/index.js +11 -0
@@ -0,0 +1,553 @@
1
+ # Grid Types - Grid Lite, Tree Grid, Hierarchical Grid & Pivot Grid
2
+
3
+ > **Part of the [`igniteui-blazor-grids`](../SKILL.md) skill hub.**
4
+ > For `IgbGrid` setup and column configuration — see [`structure.md`](./structure.md).
5
+
6
+ ## Contents
7
+
8
+ - [Grid Lite (`IgbGridLite`)](#grid-lite-igbgridlite)
9
+ - [Tree Grid (`IgbTreeGrid`)](#tree-grid-igbtreegrid)
10
+ - [Hierarchical Grid (`IgbHierarchicalGrid`)](#hierarchical-grid-igbhierarchicalgrid)
11
+ - [Pivot Grid (`IgbPivotGrid`)](#pivot-grid-igbpivotgrid)
12
+ - [Key Rules by Grid Type](#key-rules-by-grid-type)
13
+
14
+ ---
15
+
16
+ ## Grid Lite (`IgbGridLite`)
17
+
18
+ Lightweight, read-only grid with sorting, filtering, column resizing, and virtualization. MIT-licensed, separate package - **not** bundled with `IgniteUI.Blazor`.
19
+
20
+ > **No editing, selection, or paging.** Upgrade to `IgbGrid` when those features are needed.
21
+
22
+ ### Registration
23
+
24
+ ```csharp
25
+ // Install: dotnet add package IgniteUI.Blazor.GridLite
26
+ builder.Services.AddIgniteUIBlazor(typeof(IgbGridLiteModule));
27
+ ```
28
+
29
+ Add the Grid Lite CSS in `index.html`:
30
+
31
+ ```html
32
+ <link href="_content/IgniteUI.Blazor.GridLite/css/themes/light/bootstrap.css" rel="stylesheet" />
33
+ ```
34
+
35
+ ### Basic usage
36
+
37
+ Columns are declared as child elements (`<IgbGridLiteColumn>`), not via a `Columns` parameter:
38
+
39
+ ```razor
40
+ <IgbGridLite TItem="Employee" Data="@employees">
41
+ <IgbGridLiteColumn Field="@nameof(Employee.Name)" Header="Name" DataType="GridLiteColumnDataType.String" Sortable Filterable Resizable />
42
+ <IgbGridLiteColumn Field="@nameof(Employee.Department)" Header="Department" Sortable />
43
+ <IgbGridLiteColumn Field="@nameof(Employee.Salary)" Header="Salary" DataType="GridLiteColumnDataType.Number" Width="150px" />
44
+ <IgbGridLiteColumn Field="@nameof(Employee.HireDate)" Header="Hire Date" DataType="GridLiteColumnDataType.Date" Sortable />
45
+ </IgbGridLite>
46
+ ```
47
+
48
+ ### Column properties
49
+
50
+ | Property | Description |
51
+ |---|---|
52
+ | `Field` | Property name on the data item |
53
+ | `Header` | Column header text |
54
+ | `DataType` | `GridLiteColumnDataType.String/Number/Boolean/Date` |
55
+ | `Width` | Column width (e.g., `"150px"`) |
56
+ | `Sortable` | Enables sorting on this column |
57
+ | `SortingCaseSensitive` | Case-sensitive sorting (use alongside `Sortable`) |
58
+ | `Filterable` | Enables filtering on this column |
59
+ | `FilteringCaseSensitive` | Case-sensitive filtering (use alongside `Filterable`) |
60
+ | `Resizable` | Allows column resize |
61
+ | `Hidden` | Hides the column |
62
+
63
+ > **`Key` vs `Field`:** Use `Field` on column definitions. In sort/filter expression objects (`IgbGridLiteSortingExpression`, `IgbGridLiteFilterExpression`), use `Key` to identify the field.
64
+
65
+ ### Grid-level sorting options
66
+
67
+ ```razor
68
+ <IgbGridLite TItem="ProductInfo" Data="@products" SortingOptions="@sortingOptions">
69
+ <IgbGridLiteColumn Field="Name" Header="Name" DataType="GridLiteColumnDataType.String" Sortable />
70
+ <IgbGridLiteColumn Field="Price" Header="Price" DataType="GridLiteColumnDataType.Number" Width="150px" Sortable />
71
+ </IgbGridLite>
72
+
73
+ @code {
74
+ private IgbGridLiteSortingOptions sortingOptions = new()
75
+ {
76
+ Mode = GridLiteSortingMode.Multiple // default is Single
77
+ };
78
+ }
79
+ ```
80
+
81
+ Tri-state sorting (asc → desc → none) is always enabled - there is no property to disable it.
82
+
83
+ ### Dynamic columns
84
+
85
+ Use `@if` conditional rendering. There is no `UpdateColumnsAsync()` method:
86
+
87
+ ```razor
88
+ <IgbGridLite TItem="ProductInfo" Data="@products">
89
+ <IgbGridLiteColumn Field="Name" Header="Name" Sortable />
90
+ @if (showRating)
91
+ {
92
+ <IgbGridLiteColumn Field="Rating" Header="Rating" DataType="GridLiteColumnDataType.Number" />
93
+ }
94
+ </IgbGridLite>
95
+
96
+ @code {
97
+ private bool showRating = true;
98
+ private void ToggleRating() => showRating = !showRating;
99
+ }
100
+ ```
101
+
102
+ ### Sorting and filtering events
103
+
104
+ ```razor
105
+ <IgbGridLite TItem="ProductInfo" Data="@products"
106
+ Sorting="@HandleSorting"
107
+ Sorted="@HandleSorted"
108
+ Filtering="@HandleFiltering"
109
+ Filtered="@HandleFiltered">
110
+ <IgbGridLiteColumn Field="Name" Header="Name" Sortable Filterable />
111
+ </IgbGridLite>
112
+ ```
113
+
114
+ ### Grid Lite key rules
115
+
116
+ 1. **Declarative columns** - use `<IgbGridLiteColumn>` child elements. The old `Columns` parameter + `List<IgbColumnConfiguration>` is removed.
117
+ 2. **Column properties**: `Key` → `Field`, `Type` → `DataType`, `HeaderText` → `Header`.
118
+ 3. **Sort/filter attributes**: `Sort = true` → `Sortable`; `Filter = true` → `Filterable`.
119
+ 4. **Grid-level sorting**: `SortConfiguration` → `SortingOptions`; `IgbGridLiteSortConfiguration` → `IgbGridLiteSortingOptions`; `Multiple = true/false` → `Mode = GridLiteSortingMode.Multiple/Single`.
120
+ 5. **Dynamic columns via `@if`** - `UpdateColumnsAsync()` is removed.
121
+ 6. **Own package and CSS** - install `IgniteUI.Blazor.GridLite` and include its CSS theme separately.
122
+ 7. **Upgrade path** - when Grid Lite's capabilities are insufficient, upgrade to `IgbGrid`.
123
+
124
+ ---
125
+
126
+ ## Tree Grid (`IgbTreeGrid`)
127
+
128
+ The Tree Grid displays self-referencing (parent-child) data in a single schema. Rows can be expanded to reveal child rows.
129
+
130
+ ### Registration
131
+
132
+ ```csharp
133
+ builder.Services.AddIgniteUIBlazor(typeof(IgbTreeGridModule));
134
+ ```
135
+
136
+ ### Option A - Foreign Key (flat data with parent-child relationship)
137
+
138
+ ```razor
139
+ <IgbTreeGrid Data="employees" PrimaryKey="Id" ForeignKey="ManagerId"
140
+ AutoGenerate="false" Width="100%" Height="600px">
141
+ <IgbColumn Field="Id" Header="ID" DataType="GridColumnDataType.Number" />
142
+ <IgbColumn Field="Name" Header="Employee" DataType="GridColumnDataType.String" />
143
+ <IgbColumn Field="Title" Header="Title" DataType="GridColumnDataType.String" />
144
+ <IgbColumn Field="HireDate" Header="Hire Date" DataType="GridColumnDataType.Date" />
145
+ </IgbTreeGrid>
146
+
147
+ @code {
148
+ private List<Employee> employees = new()
149
+ {
150
+ // flat list: root rows have null ManagerId
151
+ new(1, "Casey Houston", "VP", null, new DateTime(2017, 1, 15)),
152
+ new(2, "Gilberto Todd", "Director", 1, new DateTime(2018, 3, 20)),
153
+ // ...
154
+ };
155
+
156
+ record Employee(int Id, string Name, string Title, int? ManagerId, DateTime HireDate);
157
+ }
158
+ ```
159
+
160
+ The `ForeignKey` property identifies which field references the parent's `PrimaryKey`. Rows with `null` (or 0/default) in the foreign key are root-level.
161
+
162
+ ### Option B - Child Collection (nested data)
163
+
164
+ ```razor
165
+ <IgbTreeGrid Data="fileSystem" PrimaryKey="Id" ChildDataKey="Children"
166
+ AutoGenerate="false" Width="100%" Height="500px">
167
+ <IgbColumn Field="Name" Header="Name" DataType="GridColumnDataType.String" />
168
+ <IgbColumn Field="Size" Header="Size (KB)" DataType="GridColumnDataType.Number" />
169
+ <IgbColumn Field="Type" Header="Type" DataType="GridColumnDataType.String" />
170
+ </IgbTreeGrid>
171
+
172
+ @code {
173
+ private List<FileNode> fileSystem = new()
174
+ {
175
+ new FileNode { Id = 1, Name = "Documents", Type = "Folder", Size = 0,
176
+ Children = new() {
177
+ new FileNode { Id = 2, Name = "Resume.pdf", Type = "PDF", Size = 250 }
178
+ }
179
+ },
180
+ // ...
181
+ };
182
+
183
+ public class FileNode
184
+ {
185
+ public int Id { get; set; }
186
+ public string Name { get; set; } = "";
187
+ public string Type { get; set; } = "";
188
+ public int Size { get; set; }
189
+ public List<FileNode> Children { get; set; } = new();
190
+ }
191
+ }
192
+ ```
193
+
194
+ The `ChildDataKey` property identifies the collection property on each row that holds its children.
195
+
196
+ ### Cascade selection
197
+
198
+ When using `RowSelection="GridSelectionMode.MultipleCascade"`, selecting a parent automatically selects all its descendants:
199
+
200
+ ```razor
201
+ <IgbTreeGrid Data="data" PrimaryKey="Id" ForeignKey="ParentId"
202
+ RowSelection="GridSelectionMode.MultipleCascade">
203
+ ...
204
+ </IgbTreeGrid>
205
+ ```
206
+
207
+ ### Expansion depth
208
+
209
+ Control how many levels are expanded by default:
210
+
211
+ ```razor
212
+ <IgbTreeGrid Data="data" PrimaryKey="Id" ChildDataKey="Children"
213
+ ExpansionDepth="1">
214
+ ...
215
+ </IgbTreeGrid>
216
+ ```
217
+
218
+ `ExpansionDepth="0"` collapses all; `ExpansionDepth="1"` shows the first level expanded.
219
+
220
+ ### Load on Demand
221
+
222
+ Load child data lazily when a parent row is expanded:
223
+
224
+ ```razor
225
+ <IgbTreeGrid Data="rootData" PrimaryKey="Id" HasChildrenKey="HasChildren"
226
+ LoadChildrenOnDemand="OnLoadChildren">
227
+ <IgbColumn Field="Name" Header="Name" />
228
+ <IgbColumn Field="EmployeeCount" Header="Count" />
229
+ </IgbTreeGrid>
230
+
231
+ @code {
232
+ private List<Department> rootData = new();
233
+
234
+ private async Task OnLoadChildren(IgbTreeGridLoadOnDemandEventArgs args)
235
+ {
236
+ var parentId = (int)args.ParentID;
237
+ var children = await DepartmentService.GetChildrenAsync(parentId);
238
+ args.ChildData = children.ToArray();
239
+ }
240
+
241
+ public class Department
242
+ {
243
+ public int Id { get; set; }
244
+ public string Name { get; set; } = "";
245
+ public int EmployeeCount { get; set; }
246
+ public bool HasChildren { get; set; }
247
+ }
248
+ }
249
+ ```
250
+
251
+ - `HasChildrenKey` tells the grid which rows have children (so it shows the expand arrow).
252
+ - `LoadChildrenOnDemand` is the callback that fetches and supplies children.
253
+
254
+ ### Tree Grid key parameters
255
+
256
+ | Parameter | Type | Description |
257
+ |---|---|---|
258
+ | `PrimaryKey` | `string` | Unique identifier field |
259
+ | `ForeignKey` | `string` | Parent reference field (flat data) |
260
+ | `ChildDataKey` | `string` | Child collection property (nested data) |
261
+ | `HasChildrenKey` | `string` | Boolean field for load-on-demand |
262
+ | `ExpansionDepth` | `int` | Initial expansion level |
263
+ | `LoadChildrenOnDemand` | `EventCallback<IgbTreeGridLoadOnDemandEventArgs>` | Lazy-load callback |
264
+ | `CascadeOnDelete` | `CascadeOnDelete` | `CascadeOnDelete.None` or `CascadeOnDelete.Cascade` - controls whether deleting a parent deletes children |
265
+
266
+ ---
267
+
268
+ ## Hierarchical Grid (`IgbHierarchicalGrid`)
269
+
270
+ The Hierarchical Grid handles **multi-schema** parent-child data where each level has its own columns and configuration. Use `IgbRowIsland` for each child level.
271
+
272
+ ### Registration
273
+
274
+ ```csharp
275
+ builder.Services.AddIgniteUIBlazor(typeof(IgbHierarchicalGridModule));
276
+ ```
277
+
278
+ ### Basic usage
279
+
280
+ ```razor
281
+ <IgbHierarchicalGrid Data="customers" PrimaryKey="CustomerId"
282
+ AutoGenerate="false" Width="100%" Height="600px">
283
+ <IgbColumn Field="CustomerId" Header="ID" DataType="GridColumnDataType.Number" />
284
+ <IgbColumn Field="CompanyName" Header="Company" DataType="GridColumnDataType.String" />
285
+ <IgbColumn Field="ContactName" Header="Contact" DataType="GridColumnDataType.String" />
286
+
287
+ <IgbRowIsland Key="Orders" PrimaryKey="OrderId" AutoGenerate="false">
288
+ <IgbColumn Field="OrderId" Header="Order ID" DataType="GridColumnDataType.Number" />
289
+ <IgbColumn Field="OrderDate" Header="Date" DataType="GridColumnDataType.Date" />
290
+ <IgbColumn Field="ShipCountry" Header="Ship Country" DataType="GridColumnDataType.String" />
291
+
292
+ <IgbRowIsland Key="OrderDetails" PrimaryKey="DetailId" AutoGenerate="false">
293
+ <IgbColumn Field="DetailId" Header="Detail ID" DataType="GridColumnDataType.Number" />
294
+ <IgbColumn Field="ProductName" Header="Product" DataType="GridColumnDataType.String" />
295
+ <IgbColumn Field="Quantity" Header="Qty" DataType="GridColumnDataType.Number" />
296
+ <IgbColumn Field="UnitPrice" Header="Price" DataType="GridColumnDataType.Currency" />
297
+ </IgbRowIsland>
298
+ </IgbRowIsland>
299
+ </IgbHierarchicalGrid>
300
+
301
+ @code {
302
+ private List<Customer> customers = new();
303
+
304
+ protected override void OnInitialized()
305
+ {
306
+ customers = CustomerService.GetCustomersWithOrders();
307
+ }
308
+
309
+ public class Customer
310
+ {
311
+ public int CustomerId { get; set; }
312
+ public string CompanyName { get; set; } = "";
313
+ public string ContactName { get; set; } = "";
314
+ public List<Order> Orders { get; set; } = new();
315
+ }
316
+
317
+ public class Order
318
+ {
319
+ public int OrderId { get; set; }
320
+ public DateTime OrderDate { get; set; }
321
+ public string ShipCountry { get; set; } = "";
322
+ public List<OrderDetail> OrderDetails { get; set; } = new();
323
+ }
324
+
325
+ public class OrderDetail
326
+ {
327
+ public int DetailId { get; set; }
328
+ public string ProductName { get; set; } = "";
329
+ public int Quantity { get; set; }
330
+ public decimal UnitPrice { get; set; }
331
+ }
332
+ }
333
+ ```
334
+
335
+ ### How `IgbRowIsland` works
336
+
337
+ - The `Key` property matches the collection property name on the parent data object (e.g., `Key="Orders"` matches `Customer.Orders`).
338
+ - Each `IgbRowIsland` is a **template** - it defines columns and features for all child grids at that level.
339
+ - Row islands can be nested to any depth.
340
+ - Each child grid instance is independent - it has its own sorting, filtering, selection, and paging state.
341
+
342
+ ### Independent feature configuration per level
343
+
344
+ ```razor
345
+ <IgbHierarchicalGrid Data="customers" PrimaryKey="CustomerId"
346
+ RowSelection="GridSelectionMode.Multiple"
347
+ AllowFiltering="true">
348
+ <IgbColumn Field="CompanyName" Sortable="true" Filterable="true" />
349
+
350
+ <IgbRowIsland Key="Orders" PrimaryKey="OrderId"
351
+ RowSelection="GridSelectionMode.Single"
352
+ AllowFiltering="true"
353
+ FilterMode="FilterMode.ExcelStyleFilter">
354
+ <IgbColumn Field="OrderDate" Sortable="true" Filterable="true" />
355
+ <IgbColumn Field="Total" HasSummary="true" />
356
+ </IgbRowIsland>
357
+ </IgbHierarchicalGrid>
358
+ ```
359
+
360
+ ### Accessing child grid instances
361
+
362
+ When a user expands a row, a child grid instance is created. Access it via the `GridCreated` event:
363
+
364
+ ```razor
365
+ <IgbHierarchicalGrid Data="customers" PrimaryKey="CustomerId">
366
+ <IgbColumn Field="CompanyName" />
367
+ <IgbRowIsland Key="Orders" PrimaryKey="OrderId"
368
+ GridCreated="OnChildGridCreated">
369
+ <IgbColumn Field="OrderId" />
370
+ <IgbColumn Field="Total" />
371
+ </IgbRowIsland>
372
+ </IgbHierarchicalGrid>
373
+
374
+ @code {
375
+ private void OnChildGridCreated(IgbGridCreatedEventArgs args)
376
+ {
377
+ var childGrid = args.Owner; // the IgbGrid instance for this child level
378
+ // Perform operations on the child grid
379
+ }
380
+ }
381
+ ```
382
+
383
+ ### Hierarchical Grid key parameters
384
+
385
+ | Parameter | Type | Description |
386
+ |---|---|---|
387
+ | `Data` | `object` | Root-level data collection |
388
+ | `PrimaryKey` | `string` | Unique identifier for each level |
389
+ | `AutoGenerate` | `bool` | Auto-generate columns for each level |
390
+
391
+ ### IgbRowIsland key parameters
392
+
393
+ | Parameter | Type | Description |
394
+ |---|---|---|
395
+ | `Key` | `string` | Property name of the child collection on the parent object |
396
+ | `PrimaryKey` | `string` | Unique identifier for this level |
397
+ | `AutoGenerate` | `bool` | Auto-generate columns |
398
+ | `GridCreated` | `EventCallback<IgbGridCreatedEventArgs>` | Fires when a child grid is created on expand |
399
+ | `GridInitialized` | `EventCallback<IgbGridCreatedEventArgs>` | Fires when a child grid is initialized |
400
+
401
+ All standard grid features (sorting, filtering, editing, selection, toolbar) are available on `IgbRowIsland` - they apply to every child grid instance created from that template.
402
+
403
+ ---
404
+
405
+ ## Pivot Grid (`IgbPivotGrid`)
406
+
407
+ The Pivot Grid provides pivot-table-style analytics with configurable dimensions (rows/columns/filters) and aggregation values.
408
+
409
+ ### Registration
410
+
411
+ ```csharp
412
+ builder.Services.AddIgniteUIBlazor(typeof(IgbPivotGridModule));
413
+ ```
414
+
415
+ ### Basic usage
416
+
417
+ ```razor
418
+ <IgbPivotGrid Data="salesData" PivotConfiguration="pivotConfig"
419
+ Width="100%" Height="600px" />
420
+
421
+ @code {
422
+ private List<SalesRecord> salesData = new();
423
+ private IgbPivotConfiguration pivotConfig = default!;
424
+
425
+ protected override void OnInitialized()
426
+ {
427
+ salesData = SalesService.GetSalesData();
428
+
429
+ pivotConfig = new IgbPivotConfiguration
430
+ {
431
+ Rows = new List<IgbPivotDimension>
432
+ {
433
+ new IgbPivotDimension { MemberName = "Country", Enabled = true },
434
+ new IgbPivotDimension { MemberName = "City", Enabled = true }
435
+ },
436
+ Columns = new List<IgbPivotDimension>
437
+ {
438
+ new IgbPivotDimension { MemberName = "Year", Enabled = true }
439
+ },
440
+ Values = new List<IgbPivotValue>
441
+ {
442
+ new IgbPivotValue
443
+ {
444
+ Member = "Revenue",
445
+ Aggregate = new IgbPivotAggregation { AggregatorName = PivotAggregationType.SUM, Key = "SUM", Label = "Sum of Revenue" },
446
+ Enabled = true
447
+ }
448
+ },
449
+ Filters = new List<IgbPivotDimension>
450
+ {
451
+ new IgbPivotDimension { MemberName = "ProductCategory", Enabled = true }
452
+ }
453
+ };
454
+ }
455
+
456
+ public class SalesRecord
457
+ {
458
+ public string Country { get; set; } = "";
459
+ public string City { get; set; } = "";
460
+ public int Year { get; set; }
461
+ public string ProductCategory { get; set; } = "";
462
+ public decimal Revenue { get; set; }
463
+ public int UnitsSold { get; set; }
464
+ }
465
+ }
466
+ ```
467
+
468
+ ### IPivotConfiguration structure
469
+
470
+ | Property | Type | Description |
471
+ |---|---|---|
472
+ | `Rows` | `List<IgbPivotDimension>` | Dimensions placed on rows |
473
+ | `Columns` | `List<IgbPivotDimension>` | Dimensions placed on columns |
474
+ | `Values` | `List<IgbPivotValue>` | Measures/aggregations |
475
+ | `Filters` | `List<IgbPivotDimension>` | Dimensions used as filters (shown in filter chip area) |
476
+
477
+ ### IgbPivotDimension
478
+
479
+ | Property | Type | Description |
480
+ |---|---|---|
481
+ | `MemberName` | `string` | Data property name |
482
+ | `Enabled` | `bool` | Whether this dimension is active |
483
+ | `DisplayName` | `string` | Custom display label |
484
+ | `ChildLevel` | `IgbPivotDimension` | Nested hierarchy dimension |
485
+ | `SortDirection` | `SortingDirection` | Sort direction for this dimension |
486
+
487
+ ### IgbPivotValue
488
+
489
+ | Property | Type | Description |
490
+ |---|---|---|
491
+ | `Member` | `string` | Data property to aggregate |
492
+ | `Aggregate` | `IgbPivotAggregation` | Aggregation function |
493
+ | `Enabled` | `bool` | Whether this value is active |
494
+ | `DisplayName` | `string` | Custom display label |
495
+ | `Formatter` | `Func<object, string>?` | Custom value formatter |
496
+
497
+ ### Built-in aggregation types
498
+
499
+ | `PivotAggregationType` | Description |
500
+ |---|---|
501
+ | `SUM` | Sum of values |
502
+ | `COUNT` | Count of records |
503
+ | `MIN` | Minimum value |
504
+ | `MAX` | Maximum value |
505
+ | `AVG` | Average value |
506
+
507
+ ### Pivot Data Selector
508
+
509
+ Add a panel that lets users drag dimensions and values interactively:
510
+
511
+ ```razor
512
+ <div style="display: flex; gap: 16px;">
513
+ <IgbPivotDataSelector @ref="selector" Grid="pivotGrid" />
514
+ <IgbPivotGrid @ref="pivotGrid" Data="salesData" PivotConfiguration="pivotConfig"
515
+ Width="100%" Height="600px" />
516
+ </div>
517
+
518
+ @code {
519
+ private IgbPivotGrid pivotGrid = default!;
520
+ private IgbPivotDataSelector selector = default!;
521
+ }
522
+ ```
523
+
524
+ ### Pivot Grid is read-only
525
+
526
+ The Pivot Grid does not support cell editing, row editing, or batch editing. It is a read-only analytical view. If users need to edit the source data, display it in a separate `IgbGrid`.
527
+
528
+ ---
529
+
530
+ ## Key Rules by Grid Type
531
+
532
+ ### Tree Grid rules
533
+
534
+ 1. Use **either** `ForeignKey` (flat data) **or** `ChildDataKey` (nested data), never both.
535
+ 2. `PrimaryKey` is required.
536
+ 3. Root rows have `null`/`0`/default in the foreign key field, or are the top-level objects in a nested collection.
537
+ 4. `MultipleCascade` selection cascades to all descendants.
538
+ 5. Load-on-demand requires both `HasChildrenKey` and `LoadChildrenOnDemand`.
539
+
540
+ ### Hierarchical Grid rules
541
+
542
+ 1. `IgbRowIsland.Key` must exactly match the collection property name on the parent data class (case-sensitive).
543
+ 2. Each level is independent - it has its own columns, sorting, filtering, and editing state.
544
+ 3. Access child grid instances via `GridCreated`, never assume a child grid exists before expansion.
545
+ 4. Nesting depth is unlimited - nest `IgbRowIsland` within `IgbRowIsland`.
546
+
547
+ ### Pivot Grid rules
548
+
549
+ 1. Pivot Grid is **read-only** - no cell/row/batch editing.
550
+ 2. Configure dimensions and values via `IgbPivotConfiguration` in C#.
551
+ 3. Sorting/filtering in the pivot is dimension-based, not column-based.
552
+ 4. Use `IgbPivotDataSelector` for an interactive drag-and-drop UI.
553
+ 5. Row selection, cell selection, and column selection are not supported.