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,176 +1,68 @@
|
|
|
1
|
-
# Features
|
|
1
|
+
# Features — Grouping, Summaries, Toolbar, Export, Row Drag, Action Strip, Master-Detail
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> For grid setup and column configuration — see [`structure.md`](./structure.md).
|
|
5
|
-
> For cell and row editing — see [`editing.md`](./editing.md).
|
|
3
|
+
Setup and columns are in [`structure.md`](./structure.md); editing in [`editing.md`](./editing.md).
|
|
6
4
|
|
|
7
|
-
##
|
|
5
|
+
## Grouping — `IgbGrid` only
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
- [Summaries](#summaries)
|
|
11
|
-
- [Cell Merging (IgbGrid Only)](#cell-merging-igbgrid-only)
|
|
12
|
-
- [Toolbar](#toolbar)
|
|
13
|
-
- [Export](#export)
|
|
14
|
-
- [Virtualization & Performance](#virtualization--performance)
|
|
15
|
-
- [Row Drag](#row-drag)
|
|
16
|
-
- [Action Strip](#action-strip)
|
|
17
|
-
- [Master-Detail (IgbGrid Only)](#master-detail-igbgrid-only)
|
|
18
|
-
- [Clipboard](#clipboard)
|
|
19
|
-
- [Key Rules](#key-rules)
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Grouping (IgbGrid Only)
|
|
24
|
-
|
|
25
|
-
Grouping is exclusive to the Flat Grid (`IgbGrid`). Tree Grid and Hierarchical Grid do not support grouping.
|
|
26
|
-
|
|
27
|
-
### Enable grouping
|
|
7
|
+
Tree Grid and Hierarchical Grid have no grouping; the Pivot Grid uses dimensions instead.
|
|
28
8
|
|
|
29
9
|
```razor
|
|
30
|
-
<IgbGrid Data="data" PrimaryKey="Id"
|
|
10
|
+
<IgbGrid Data="data" PrimaryKey="Id"
|
|
11
|
+
GroupingExpressions="groupingExpressions"
|
|
12
|
+
HideGroupedColumns="true"
|
|
13
|
+
ShowGroupArea="true"
|
|
14
|
+
GroupingDone="OnGroupingDone">
|
|
31
15
|
<IgbColumn Field="Department" Header="Department" Groupable="true" />
|
|
32
16
|
<IgbColumn Field="Name" Header="Name" />
|
|
33
|
-
<IgbColumn Field="Salary" Header="Salary" DataType="GridColumnDataType.Currency" />
|
|
34
|
-
</IgbGrid>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Users can drag column headers to the group area, or click the column menu grouping option.
|
|
38
|
-
|
|
39
|
-
### Pre-set grouping expressions
|
|
40
|
-
|
|
41
|
-
```razor
|
|
42
|
-
<IgbGrid Data="data" PrimaryKey="Id" GroupingExpressions="groupingExpressions">
|
|
43
|
-
<IgbColumn Field="Department" Groupable="true" />
|
|
44
|
-
<IgbColumn Field="Name" />
|
|
45
|
-
</IgbGrid>
|
|
46
|
-
|
|
47
|
-
@code {
|
|
48
|
-
private IgbGroupingExpression[] groupingExpressions = new[]
|
|
49
|
-
{
|
|
50
|
-
new IgbGroupingExpression
|
|
51
|
-
{
|
|
52
|
-
FieldName = "Department",
|
|
53
|
-
Dir = SortingDirection.Asc
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Group row template
|
|
60
|
-
|
|
61
|
-
Customize the group row:
|
|
62
17
|
|
|
63
|
-
```razor
|
|
64
|
-
<IgbGrid Data="data" PrimaryKey="Id">
|
|
65
|
-
<IgbColumn Field="Department" Groupable="true" />
|
|
66
18
|
<GroupRowTemplate>
|
|
67
|
-
@{
|
|
68
|
-
var groupRow = (IgbGroupByRowTemplateContext)context;
|
|
69
|
-
}
|
|
19
|
+
@{ var groupRow = (IgbGroupByRowTemplateContext)context; }
|
|
70
20
|
<span>
|
|
71
|
-
<strong>@groupRow.Implicit.Expression.FieldName</strong>:
|
|
72
|
-
@groupRow.Implicit.Value
|
|
21
|
+
<strong>@groupRow.Implicit.Expression.FieldName</strong>: @groupRow.Implicit.Value
|
|
73
22
|
(@groupRow.Implicit.Records.Length items)
|
|
74
23
|
</span>
|
|
75
24
|
</GroupRowTemplate>
|
|
76
25
|
</IgbGrid>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Hide grouped columns from the grid
|
|
80
|
-
|
|
81
|
-
```razor
|
|
82
|
-
<IgbGrid Data="data" PrimaryKey="Id" HideGroupedColumns="true">
|
|
83
|
-
...
|
|
84
|
-
</IgbGrid>
|
|
85
|
-
```
|
|
86
26
|
|
|
87
|
-
|
|
27
|
+
@code {
|
|
28
|
+
private IgbGroupingExpression[] groupingExpressions =
|
|
29
|
+
{
|
|
30
|
+
new() { FieldName = "Department", Dir = SortingDirection.Asc }
|
|
31
|
+
};
|
|
88
32
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
...
|
|
92
|
-
</IgbGrid>
|
|
33
|
+
private void OnGroupingDone(IgbGroupingDoneEventArgs args) { }
|
|
34
|
+
}
|
|
93
35
|
```
|
|
94
36
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| Event | Type | Description |
|
|
98
|
-
|---|---|---|
|
|
99
|
-
| `GroupingDone` | `EventCallback<IgbGroupingDoneEventArgs>` | Fires after a column is grouped/ungrouped |
|
|
100
|
-
|
|
101
|
-
---
|
|
37
|
+
Users group by dragging a header into the group area or via the column menu. `HideGroupedColumns` removes the grouped column from the body; `ShowGroupArea="false"` hides the drop zone.
|
|
102
38
|
|
|
103
39
|
## Summaries
|
|
104
40
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Enable with `HasSummary="true"` on a column. The built-in summaries depend on the column's data type:
|
|
108
|
-
|
|
109
|
-
| Data Type | Default Summaries |
|
|
110
|
-
|---|---|
|
|
111
|
-
| String | Count |
|
|
112
|
-
| Number | Count, Min, Max, Sum, Avg |
|
|
113
|
-
| Date | Count, Earliest, Latest |
|
|
114
|
-
| Boolean | Count |
|
|
115
|
-
|
|
116
|
-
```razor
|
|
117
|
-
<IgbGrid Data="data" PrimaryKey="Id">
|
|
118
|
-
<IgbColumn Field="Name" Header="Name" HasSummary="true" DataType="GridColumnDataType.String" />
|
|
119
|
-
<IgbColumn Field="Salary" Header="Salary" HasSummary="true" DataType="GridColumnDataType.Number" />
|
|
120
|
-
<IgbColumn Field="HireDate" Header="Hire Date" HasSummary="true" DataType="GridColumnDataType.Date" />
|
|
121
|
-
</IgbGrid>
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Custom summary operands
|
|
125
|
-
|
|
126
|
-
Custom summaries in Blazor are implemented via JavaScript using `ColumnInitScript`. Define a JavaScript class with an `operate(data, allData, fieldName)` method that returns an array of `{ key, label, summaryResult }` objects, then assign it during column initialization.
|
|
127
|
-
|
|
128
|
-
> For full custom summary class syntax, call `get_doc(framework: "blazor", name: "grid-summaries")` for the JavaScript pattern and template usage.
|
|
129
|
-
|
|
130
|
-
### Summary position
|
|
131
|
-
|
|
132
|
-
```razor
|
|
133
|
-
<IgbGrid Data="data" PrimaryKey="Id" SummaryPosition="GridSummaryPosition.Top">
|
|
134
|
-
...
|
|
135
|
-
</IgbGrid>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Values: `GridSummaryPosition.Top`, `GridSummaryPosition.Bottom` (default).
|
|
139
|
-
|
|
140
|
-
### Summary calculation mode
|
|
41
|
+
`HasSummary="true"` on a column enables the built-ins for its data type: String/Boolean → Count; Number → Count, Min, Max, Sum, Avg; Date → Count, Earliest, Latest.
|
|
141
42
|
|
|
142
43
|
```razor
|
|
143
|
-
<IgbGrid Data="data" PrimaryKey="Id"
|
|
144
|
-
|
|
44
|
+
<IgbGrid Data="data" PrimaryKey="Id"
|
|
45
|
+
SummaryPosition="GridSummaryPosition.Bottom"
|
|
46
|
+
SummaryCalculationMode="GridSummaryCalculationMode.RootAndChildLevels">
|
|
47
|
+
<IgbColumn Field="Salary" HasSummary="true" DataType="GridColumnDataType.Number" />
|
|
145
48
|
</IgbGrid>
|
|
146
49
|
```
|
|
147
50
|
|
|
148
|
-
|
|
51
|
+
`GridSummaryPosition`: `Top`, `Bottom` (default). `GridSummaryCalculationMode`: `RootLevelOnly`, `ChildLevelsOnly`, `RootAndChildLevels` — set it deliberately on Tree and Hierarchical grids.
|
|
149
52
|
|
|
150
|
-
|
|
53
|
+
Custom summaries go through JavaScript: register a class exposing `operate(data, allData, fieldName)` returning `{ key, label, summaryResult }` objects and attach it with `ColumnInitScript`. Read `get_doc(framework: "blazor", name: "grid-summaries")` for the exact shape.
|
|
151
54
|
|
|
152
|
-
## Cell
|
|
153
|
-
|
|
154
|
-
Merge visually identical adjacent cells in a column:
|
|
55
|
+
## Cell merging — `IgbGrid` only
|
|
155
56
|
|
|
156
57
|
```razor
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
<IgbColumn Field="City" Header="City" Merge="true" />
|
|
160
|
-
<IgbColumn Field="Name" Header="Name" />
|
|
161
|
-
</IgbGrid>
|
|
58
|
+
<IgbColumn Field="Country" Merge="true" />
|
|
59
|
+
<IgbColumn Field="City" Merge="true" />
|
|
162
60
|
```
|
|
163
61
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
---
|
|
62
|
+
Merges visually identical adjacent cells. Sort by the merged columns first, or the merges will be scattered.
|
|
167
63
|
|
|
168
64
|
## Toolbar
|
|
169
65
|
|
|
170
|
-
The grid toolbar provides built-in UI for column hiding, column pinning, exporting, and advanced filtering.
|
|
171
|
-
|
|
172
|
-
### Basic toolbar
|
|
173
|
-
|
|
174
66
|
```razor
|
|
175
67
|
<IgbGrid Data="data" PrimaryKey="Id">
|
|
176
68
|
<IgbGridToolbar>
|
|
@@ -178,213 +70,83 @@ The grid toolbar provides built-in UI for column hiding, column pinning, exporti
|
|
|
178
70
|
<IgbGridToolbarActions>
|
|
179
71
|
<IgbGridToolbarHiding />
|
|
180
72
|
<IgbGridToolbarPinning />
|
|
181
|
-
<IgbGridToolbarExporter />
|
|
182
73
|
<IgbGridToolbarAdvancedFiltering />
|
|
74
|
+
<IgbGridToolbarExporter ExportExcel="true" ExportCSV="true" Filename="employees" />
|
|
75
|
+
<IgbButton @onclick="RefreshData">Refresh</IgbButton>
|
|
183
76
|
</IgbGridToolbarActions>
|
|
184
77
|
</IgbGridToolbar>
|
|
185
|
-
|
|
186
|
-
<IgbColumn Field="Department" Header="Department" />
|
|
78
|
+
…
|
|
187
79
|
</IgbGrid>
|
|
188
80
|
```
|
|
189
81
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
| Component | Description |
|
|
193
|
-
|---|---|
|
|
194
|
-
| `IgbGridToolbar` | Container for the toolbar |
|
|
195
|
-
| `IgbGridToolbarTitle` | Displays a title/caption |
|
|
196
|
-
| `IgbGridToolbarActions` | Container for action buttons |
|
|
197
|
-
| `IgbGridToolbarHiding` | Column hiding UI |
|
|
198
|
-
| `IgbGridToolbarPinning` | Column pinning UI |
|
|
199
|
-
| `IgbGridToolbarExporter` | Export to Excel/CSV buttons |
|
|
200
|
-
| `IgbGridToolbarAdvancedFiltering` | Opens the advanced filtering dialog |
|
|
201
|
-
|
|
202
|
-
### Custom toolbar content
|
|
203
|
-
|
|
204
|
-
```razor
|
|
205
|
-
<IgbGridToolbar>
|
|
206
|
-
<IgbGridToolbarTitle>My Data</IgbGridToolbarTitle>
|
|
207
|
-
<IgbGridToolbarActions>
|
|
208
|
-
<IgbButton @onclick="RefreshData">Refresh</IgbButton>
|
|
209
|
-
<IgbGridToolbarExporter />
|
|
210
|
-
</IgbGridToolbarActions>
|
|
211
|
-
</IgbGridToolbar>
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
---
|
|
82
|
+
`IgbGridToolbarActions` accepts arbitrary content alongside the built-in action components.
|
|
215
83
|
|
|
216
84
|
## Export
|
|
217
85
|
|
|
218
|
-
### Excel Export
|
|
219
|
-
|
|
220
86
|
```razor
|
|
221
|
-
<
|
|
222
|
-
<IgbGridToolbar>
|
|
223
|
-
<IgbGridToolbarActions>
|
|
224
|
-
<IgbGridToolbarExporter ExportExcel="true" ExportCSV="false" />
|
|
225
|
-
</IgbGridToolbarActions>
|
|
226
|
-
</IgbGridToolbar>
|
|
227
|
-
...
|
|
228
|
-
</IgbGrid>
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### Programmatic export
|
|
232
|
-
|
|
233
|
-
Use a `@ref` on the `IgbGridToolbarExporter` to trigger export from code:
|
|
234
|
-
|
|
235
|
-
```razor
|
|
236
|
-
<IgbGrid @ref="grid" Data="data" PrimaryKey="Id">
|
|
237
|
-
<IgbGridToolbar>
|
|
238
|
-
<IgbGridToolbarActions>
|
|
239
|
-
<IgbGridToolbarExporter @ref="exporter" ExportExcel="true" ExportCSV="true" Filename="employees" />
|
|
240
|
-
</IgbGridToolbarActions>
|
|
241
|
-
</IgbGridToolbar>
|
|
242
|
-
...
|
|
243
|
-
</IgbGrid>
|
|
244
|
-
|
|
245
|
-
<IgbButton @onclick="ExportToExcel">Export to Excel</IgbButton>
|
|
246
|
-
<IgbButton @onclick="ExportToCsv">Export to CSV</IgbButton>
|
|
87
|
+
<IgbGridToolbarExporter @ref="exporter" ExportExcel="true" ExportCSV="true" Filename="employees" />
|
|
247
88
|
|
|
248
89
|
@code {
|
|
249
|
-
private IgbGrid grid = default!;
|
|
250
90
|
private IgbGridToolbarExporter exporter = default!;
|
|
251
91
|
|
|
252
|
-
private
|
|
253
|
-
|
|
254
|
-
await exporter.ExportGridAsync(GridToolbarExporterType.Excel);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
private async Task ExportToCsv()
|
|
258
|
-
{
|
|
259
|
-
await exporter.ExportGridAsync(GridToolbarExporterType.CSV);
|
|
260
|
-
}
|
|
92
|
+
private Task ExportToExcel() => exporter.ExportGridAsync(GridToolbarExporterType.Excel);
|
|
93
|
+
private Task ExportToCsv() => exporter.ExportGridAsync(GridToolbarExporterType.CSV);
|
|
261
94
|
}
|
|
262
95
|
```
|
|
263
96
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
Handle `ToolbarExporting` on the grid to modify options or cancel the export:
|
|
97
|
+
Configure or cancel an export from the grid's `ToolbarExporting` event. In Blazor the practical hook is the JS variant, because the exporter's own per-column and per-row events are only reachable from script:
|
|
267
98
|
|
|
268
99
|
```razor
|
|
269
|
-
<IgbGrid Data="data" PrimaryKey="Id" ToolbarExportingScript="OnToolbarExporting">
|
|
270
|
-
<IgbGridToolbar>
|
|
271
|
-
<IgbGridToolbarActions>
|
|
272
|
-
<IgbGridToolbarExporter ExportExcel="true" ExportCSV="true" />
|
|
273
|
-
</IgbGridToolbarActions>
|
|
274
|
-
</IgbGridToolbar>
|
|
275
|
-
...
|
|
276
|
-
</IgbGrid>
|
|
100
|
+
<IgbGrid Data="data" PrimaryKey="Id" ToolbarExportingScript="OnToolbarExporting">…</IgbGrid>
|
|
277
101
|
```
|
|
278
102
|
|
|
279
103
|
```javascript
|
|
280
|
-
// In JavaScript
|
|
281
104
|
igRegisterScript("OnToolbarExporting", (evt) => {
|
|
282
105
|
const args = evt.detail;
|
|
283
106
|
args.options.fileName = `Report_${new Date().toDateString()}`;
|
|
284
|
-
// args.cancel = true;
|
|
107
|
+
// args.cancel = true;
|
|
285
108
|
args.exporter.columnExporting.subscribe((colArgs) => {
|
|
286
|
-
if (colArgs.header === "ID")
|
|
287
|
-
colArgs.cancel = true; // skip this column
|
|
288
|
-
}
|
|
109
|
+
if (colArgs.header === "ID") colArgs.cancel = true;
|
|
289
110
|
});
|
|
290
111
|
}, false);
|
|
291
112
|
```
|
|
292
113
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
These properties exist on `IgbExporterOptionsBase`, accessible via the `ToolbarExporting` event args:
|
|
114
|
+
Options on the exporting args (`IgbExporterOptionsBase`): `FileName`, `IgnoreFiltering`, `IgnoreSorting`, `IgnoreColumnsVisibility`, `IgnoreGrouping`, `AlwaysExportHeaders`, `ExportSummaries`.
|
|
296
115
|
|
|
297
|
-
|
|
298
|
-
|---|---|---|
|
|
299
|
-
| `FileName` | `string` | Name of the exported file (without extension) |
|
|
300
|
-
| `IgnoreFiltering` | `bool` | Export all data, not just filtered |
|
|
301
|
-
| `IgnoreSorting` | `bool` | Export in original data order |
|
|
302
|
-
| `IgnoreColumnsVisibility` | `bool` | Include hidden columns in export |
|
|
303
|
-
| `IgnoreGrouping` | `bool` | Ignore grouping in export (IgbGrid only) |
|
|
304
|
-
| `AlwaysExportHeaders` | `bool` | Export headers even if there is no data |
|
|
305
|
-
| `ExportSummaries` | `bool` | Include column summaries in export |
|
|
116
|
+
Events: `ExportStarted` / `ExportEnded` on `IgbGridToolbarExporter`; `ToolbarExporting` on the grid; `ColumnExporting` / `RowExporting` reachable through the exporter in the event args.
|
|
306
117
|
|
|
307
|
-
|
|
118
|
+
## Virtualization & performance
|
|
308
119
|
|
|
309
|
-
|
|
310
|
-
|---|---|---|
|
|
311
|
-
| `ExportStarted` | `IgbGridToolbarExporter` | Fires before export begins |
|
|
312
|
-
| `ExportEnded` | `IgbGridToolbarExporter` | Fires after export completes |
|
|
313
|
-
| `ToolbarExporting` | Grid (`IgbGrid` etc.) | Fires when toolbar export is triggered - configure options or cancel |
|
|
314
|
-
| `ColumnExporting` | `IgbBaseExporter` (via event args) | Fires for each column - skip or modify |
|
|
315
|
-
| `RowExporting` | `IgbBaseExporter` (via event args) | Fires for each row - skip or modify |
|
|
120
|
+
Row and column virtualization are on by default once the grid has a fixed `Height` — only the visible viewport is rendered. Column virtualization additionally kicks in when the total column width exceeds the grid width.
|
|
316
121
|
|
|
317
|
-
|
|
122
|
+
- Bind a materialized `List<T>` or `T[]`, never `IQueryable`.
|
|
123
|
+
- Past ~100k rows, move to remote paging or server-side loading ([`paging-remote.md`](./paging-remote.md)).
|
|
124
|
+
- Keep templates on frequently re-rendered columns cheap.
|
|
125
|
+
- Use on-demand summaries when summaries slow large data sets down.
|
|
318
126
|
|
|
319
|
-
##
|
|
320
|
-
|
|
321
|
-
Both row and column virtualization are **enabled by default** when the grid has a fixed `Height`. The grid only renders DOM elements for the visible portion.
|
|
322
|
-
|
|
323
|
-
### Requirements for virtualization
|
|
324
|
-
|
|
325
|
-
1. **Set `Height`** on the grid - virtualization needs a fixed pixel or percentage height.
|
|
326
|
-
2. **Set `Width`** on columns - column virtualization requires defined column widths when total column width exceeds the grid width.
|
|
327
|
-
|
|
328
|
-
### Best practices
|
|
329
|
-
|
|
330
|
-
- Bind to a concrete `List<T>` or `T[]`, not `IQueryable`.
|
|
331
|
-
- For large data sets (100k+ rows), consider remote paging or virtualized data loading (see `references/paging-remote.md`).
|
|
332
|
-
- Avoid complex templates on frequently re-rendered columns.
|
|
333
|
-
- Use `OnDemand` summaries if summaries on large data sets cause slow rendering.
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
## Row Drag
|
|
338
|
-
|
|
339
|
-
Enable row reordering or drag-to-external targets:
|
|
127
|
+
## Row drag
|
|
340
128
|
|
|
341
129
|
```razor
|
|
342
130
|
<IgbGrid Data="data" PrimaryKey="Id" RowDraggable="true"
|
|
343
|
-
RowDragEnd="OnRowDragEnd">
|
|
344
|
-
|
|
131
|
+
RowDragStart="OnRowDragStart" RowDragEnd="OnRowDragEnd">
|
|
132
|
+
<DragGhostCustomTemplate>
|
|
133
|
+
@{ var row = (IgbGridRowDragGhostContext)context; }
|
|
134
|
+
<div class="custom-ghost">Moving: @row.Data</div>
|
|
135
|
+
</DragGhostCustomTemplate>
|
|
136
|
+
…
|
|
345
137
|
</IgbGrid>
|
|
346
138
|
|
|
347
139
|
@code {
|
|
348
|
-
private void
|
|
349
|
-
|
|
350
|
-
// args.DragData contains the dragged row data
|
|
351
|
-
}
|
|
140
|
+
private void OnRowDragStart(IgbRowDragStartEventArgs args) { }
|
|
141
|
+
private void OnRowDragEnd(IgbRowDragEndEventArgs args) => _ = args.DragData;
|
|
352
142
|
}
|
|
353
143
|
```
|
|
354
144
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
| Event | Type | Description |
|
|
358
|
-
|---|---|---|
|
|
359
|
-
| `RowDragStart` | `EventCallback<IgbRowDragStartEventArgs>` | Fires when drag begins |
|
|
360
|
-
| `RowDragEnd` | `EventCallback<IgbRowDragEndEventArgs>` | Fires when drag ends (drop) |
|
|
361
|
-
|
|
362
|
-
### Custom drag ghost
|
|
363
|
-
|
|
364
|
-
```razor
|
|
365
|
-
<IgbGrid Data="data" PrimaryKey="Id" RowDraggable="true">
|
|
366
|
-
<DragGhostCustomTemplate>
|
|
367
|
-
@{
|
|
368
|
-
var row = (IgbGridRowDragGhostContext)context;
|
|
369
|
-
}
|
|
370
|
-
<div class="custom-ghost">
|
|
371
|
-
Moving: @row.Data
|
|
372
|
-
</div>
|
|
373
|
-
</DragGhostCustomTemplate>
|
|
374
|
-
...
|
|
375
|
-
</IgbGrid>
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## Action Strip
|
|
381
|
-
|
|
382
|
-
Add context actions (edit, delete, pin) that appear when hovering or selecting a row:
|
|
145
|
+
## Action strip
|
|
383
146
|
|
|
384
147
|
```razor
|
|
385
148
|
<IgbGrid Data="data" PrimaryKey="Id" RowEditable="true">
|
|
386
|
-
<IgbColumn Field="Name"
|
|
387
|
-
<IgbColumn Field="Salary" Header="Salary" Editable="true" />
|
|
149
|
+
<IgbColumn Field="Name" Editable="true" />
|
|
388
150
|
<IgbActionStrip>
|
|
389
151
|
<IgbGridEditingActions AddRow="true" />
|
|
390
152
|
<IgbGridPinningActions />
|
|
@@ -392,34 +154,12 @@ Add context actions (edit, delete, pin) that appear when hovering or selecting a
|
|
|
392
154
|
</IgbGrid>
|
|
393
155
|
```
|
|
394
156
|
|
|
395
|
-
|
|
157
|
+
`IgbGridEditingActions` renders edit/delete (plus add-row when `AddRow="true"`) and needs `RowEditable="true"` on the grid to function. `IgbGridPinningActions` renders row pin/unpin. Extra buttons can be placed inside `IgbActionStrip` alongside them.
|
|
396
158
|
|
|
397
|
-
|
|
398
|
-
|---|---|
|
|
399
|
-
| `IgbActionStrip` | Container for row-level actions |
|
|
400
|
-
| `IgbGridEditingActions` | Provides edit/delete/add row buttons |
|
|
401
|
-
| `IgbGridPinningActions` | Provides pin/unpin row buttons |
|
|
402
|
-
|
|
403
|
-
### Custom actions
|
|
404
|
-
|
|
405
|
-
```razor
|
|
406
|
-
<IgbActionStrip>
|
|
407
|
-
<IgbGridEditingActions />
|
|
408
|
-
<IgbButton @onclick="() => ViewDetails(currentRowId)">
|
|
409
|
-
<IgbIcon Name="visibility" Collection="material" />
|
|
410
|
-
</IgbButton>
|
|
411
|
-
</IgbActionStrip>
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## Master-Detail (IgbGrid Only)
|
|
417
|
-
|
|
418
|
-
Show a detail view for each expanded row. This is specific to the flat grid - for multi-schema parent-child, use Hierarchical Grid instead.
|
|
159
|
+
## Master-detail — `IgbGrid` only
|
|
419
160
|
|
|
420
161
|
```razor
|
|
421
162
|
<IgbGrid Data="customers" PrimaryKey="CustomerId" AutoGenerate="false">
|
|
422
|
-
<IgbColumn Field="CustomerId" Header="ID" />
|
|
423
163
|
<IgbColumn Field="Name" Header="Customer Name" />
|
|
424
164
|
<IgbColumn Field="Country" Header="Country" />
|
|
425
165
|
<DetailTemplate>
|
|
@@ -434,54 +174,21 @@ Show a detail view for each expanded row. This is specific to the flat grid - fo
|
|
|
434
174
|
</div>
|
|
435
175
|
</DetailTemplate>
|
|
436
176
|
</IgbGrid>
|
|
437
|
-
|
|
438
|
-
@code {
|
|
439
|
-
private List<Customer> customers = new(); // Customer has Orders child collection
|
|
440
|
-
}
|
|
441
177
|
```
|
|
442
178
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
---
|
|
179
|
+
`DetailTemplate` exists only on `IgbGrid`. For multi-schema hierarchies use `IgbHierarchicalGrid` with `IgbRowIsland` ([`types.md`](./types.md)).
|
|
446
180
|
|
|
447
181
|
## Clipboard
|
|
448
182
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
### Key bindings
|
|
452
|
-
|
|
453
|
-
| Keys | Action |
|
|
454
|
-
|---|---|
|
|
455
|
-
| `Ctrl+C` | Copy selected cells |
|
|
456
|
-
| `Ctrl+Shift+H` | Copy with headers |
|
|
457
|
-
|
|
458
|
-
### Configuration
|
|
183
|
+
Copy works out of the box: `Ctrl+C` copies the selection, `Ctrl+Shift+H` copies it with headers.
|
|
459
184
|
|
|
460
185
|
```razor
|
|
461
|
-
<IgbGrid Data="data" PrimaryKey="Id"
|
|
462
|
-
ClipboardOptions="clipboardOptions">
|
|
463
|
-
...
|
|
464
|
-
</IgbGrid>
|
|
186
|
+
<IgbGrid Data="data" PrimaryKey="Id" ClipboardOptions="clipboardOptions">…</IgbGrid>
|
|
465
187
|
|
|
466
188
|
@code {
|
|
467
|
-
private IgbClipboardOptions clipboardOptions = new
|
|
189
|
+
private IgbClipboardOptions clipboardOptions = new()
|
|
468
190
|
{
|
|
469
|
-
Enabled = true,
|
|
470
|
-
CopyHeaders = true,
|
|
471
|
-
CopyFormatters = true,
|
|
472
|
-
Separator = "\t"
|
|
191
|
+
Enabled = true, CopyHeaders = true, CopyFormatters = true, Separator = "\t"
|
|
473
192
|
};
|
|
474
193
|
}
|
|
475
194
|
```
|
|
476
|
-
|
|
477
|
-
---
|
|
478
|
-
|
|
479
|
-
## Key Rules
|
|
480
|
-
|
|
481
|
-
1. **Grouping is IgbGrid only** - do not attempt `Groupable` on Tree Grid or Hierarchical Grid columns.
|
|
482
|
-
2. **Cell merging is IgbGrid only** - it has no effect on other grid types.
|
|
483
|
-
3. **Master-detail is IgbGrid only** - for other grids, use Tree Grid or Hierarchical Grid.
|
|
484
|
-
4. **Virtualization requires a fixed grid height** - without `Height`, all rows render.
|
|
485
|
-
5. **Export requires the toolbar or programmatic service injection** - register `IgbExcelExporterService` or `IgbCsvExporterService` if using programmatic export.
|
|
486
|
-
6. **Action strip requires `RowEditable="true"`** for editing actions to function.
|
|
487
|
-
7. **Summaries respect the `SummaryCalculationMode`** - set it for tree/hierarchical grids to control level-based calculations.
|