diff --git a/doc/en/components/bullet-graph.md b/doc/en/components/bullet-graph.md
index 91e63c485..fc10393b7 100644
--- a/doc/en/components/bullet-graph.md
+++ b/doc/en/components/bullet-graph.md
@@ -257,6 +257,80 @@ Performance value is the primary measure displayed by the component and it is vi
`sample="/gauges/bullet-graph/measures", height="125", alt="{Platform} bullet graph measures"`
+## Highlight Value
+
+The bullet graph's performance value can be further modified to show progress represented as a highlighted value. This will make the `Value` appear with a lower opacity. A good example is if `Value` is 50 and `HighlightValue` is set to 25. This would represent a performance of 50% regardless of what the value of `TargetValue` is set to. To enable this first set `HighlightValueDisplayMode` to Overlay and then apply a `HighlightValue` to something lower than `Value`.
+
+```html
+
+
+```
+
+```tsx
+
+```
+
+```html
+
+
+```
+
+```razor
+
+
+```
+
+`sample="/gauges/bullet-graph/highlight-needle", height="125", alt="{Platform} bullet graph highlight needle"`
## Comparative Ranges
The ranges are visual elements that highlight a specified range of values on a scale. Their purpose is to visually communicate the qualitative state of the performance bar measure, illustrating at the same time the degree to which it resides within that state.
diff --git a/doc/en/components/charts/chart-overview.md b/doc/en/components/charts/chart-overview.md
index 5702cb178..3a1bc5c3e 100644
--- a/doc/en/components/charts/chart-overview.md
+++ b/doc/en/components/charts/chart-overview.md
@@ -51,7 +51,7 @@ We make {Platform} Category and Financial Chart easier to use, the good news you
The {Platform} Bar Chart, or Bar Graph is among the most common category chart types used to quickly compare frequency, count, total, or average of data in different categories with data encoded by horizontal bars of equal width and differing lengths. They are ideal for showing variations in the value of an item over time, data distribution, sorted data ranking (high to low, worst to best). Data is represented using a collection of rectangles that extend from the left to right of the chart towards the values of data points. Learn more about our [bar chart](types/bar-chart.md)
-`sample="/charts/data-chart/bar-chart-multiple-sources", height="600", alt="{Platform} Bar Chart Multiple Sources"`
+`sample="/charts/data-chart/bar-chart-multiple-sources", img-src="https://static.infragistics.com/marketing/Website/products/Ignite-UI-for-Angular/ignite-ui-angular-bar-chart", height="600", alt="{Platform} Bar Chart Multiple Sources"`
diff --git a/doc/en/components/charts/features/chart-data-filtering.md b/doc/en/components/charts/features/chart-data-filtering.md
new file mode 100644
index 000000000..5b6e0ff95
--- /dev/null
+++ b/doc/en/components/charts/features/chart-data-filtering.md
@@ -0,0 +1,53 @@
+---
+title: {Platform} Chart Data Filtering | Data Visualization | Infragistics
+_description: Infragistics' {Platform} Chart Data Filtering
+_keywords: {Platform} Charts, Filtering, Infragistics
+mentionedTypes: ["CategoryChart"]
+namespace: Infragistics.Controls.Charts
+---
+
+# {Platform} Chart Data Filtering
+
+Data Filtering allows you to query large data in order to analyze and plot small subset of data entries via filter expressions, all without having to manually modify the datasource bound to the chart.
+
+A complete list of valid expressions and keywords to form a query string can be found here:
+
+[Filter expressions](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris)
+
+> NOTE: Any incorrect filter applied will result with an empty chart.
+
+## {Platform} Chart Data Filter Example
+
+The following example depicts a [Column Chart](../types/column-chart.md) of annual birth rates across several decades. The drop-down allows you to select a decade, which inserts an expression via the `InitialFilter` property, to update the chart visual and thus filtering out the other decades out.
+
+`sample="/charts/category-chart/data-filter", height="500", alt="{Platform} Data Filter Example"`
+
+
+
+The `InitialFilter` property is a string that requires the following syntax in order to filter properly. The value requires sets of parenthesesthat include both the filter expression definition, column and value associated with the record(s) filtering in.
+
+eg. To show all countries that start with the letter B:
+
+"(startswith(Country, 'B'))"
+
+eg. Concatenating more than one expression:
+
+"(startswith(Country, 'B') and endswith(Country, 'L') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))"
+
+
+## Additional Resources
+
+You can find more information about related chart features in these topics:
+
+- [Chart Annotations](chart-annotations.md)
+- [Chart Highlighting](chart-highlighting.md)
+- [Chart Tooltips](chart-tooltips.md)
+
+## API References
+
+The following is a list of API members mentioned in the above sections:
+
+- `CategoryChart`
+- `IsTransitionInEnabled`
+- `TransitionInDuration`
+- `TransitionInMode`
\ No newline at end of file
diff --git a/doc/en/components/charts/types/treemap-chart.md b/doc/en/components/charts/types/treemap-chart.md
index 82823a569..5cb120461 100644
--- a/doc/en/components/charts/types/treemap-chart.md
+++ b/doc/en/components/charts/types/treemap-chart.md
@@ -2,7 +2,7 @@
title: {Platform} Treemap | Data Visualization Tools | Orientation | Layout | Data Binding | Infragistics
_description: Use Infragistics' {Platform} Treemap control show relative weighting of data points at more than one level supporting strip, squarified, and slice-and-dice algorithms. Learn about {ProductName} treemap!
_keywords: {Platform} Tree Map, Treemap, layout, orientation, {ProductName}, Infragistics
-mentionedTypes: ["Treemap", "TreemapOrientation", "TreemapLayoutType"]
+mentionedTypes: ["Treemap", "TreemapOrientation", "TreemapLayoutType", "TreemapHighlightingMode", "TreemapHighlightedValueDisplayMode"]
namespace: Infragistics.Controls.Charts
---
# {Platform} Treemap
@@ -94,7 +94,23 @@ In the following example, the treemap demonstrates the ability of changing the l
`sample="/charts/tree-map/styling", height="600", alt="{Platform} Treemap Styling"`
+### {Platform} Treemap Highlighting
+In the following example, the treemap demonstrates the ability of node highlighting. There are two options for this feature. Each node can individually brighten, by decreasing its opacity, or cause all other nodes to trigger the same effect. To enable this feature, set `HighlightingMode`to Brighten or FadeOthers.
+
+`sample="/charts/tree-map/highlighting", height="600", alt="{Platform} Treemap Highlighting"`
+
+## {Platform} Treemap Percent based highlighting
+
+- `HighlightedItemsSource`: Specifies the datasource to read highlighted values from. If null, then highlighted values are read from the ItemsSource property.
+- `HighlightedValueMemberPath`: Specifies the name of the property in the datasource where the highlighted values are read.
+- `HighlightedValueOpacity`: Controls the opacity of the normal value behind the highlighted value.
+- `HighlightedValuesDisplayMode`: Enables or disables highlighted values.
+ - Auto: The treemap decides what mode to use.
+ - Overlay: The treemap displays highlighted values over top the normal value with a slight opacity applied to the normal value.
+ - Hidden: The treemap does not show highlighted values.
+
+`sample="/charts/tree-map/highlighting-percent-based", height="600", alt="{Platform} Treemap Percent based Highlighting"`
@@ -111,4 +127,6 @@ The following is a list of API members mentioned in the above sections:
- `Treemap`
- `LayoutOrientation`
+- `HighlightedValuesDisplayMode`
+- `HighlightedValueMemberPath`
- `LayoutType`
diff --git a/doc/en/components/general-changelog-dv-blazor.md b/doc/en/components/general-changelog-dv-blazor.md
index f8d4cca52..9dcc4a5c0 100644
--- a/doc/en/components/general-changelog-dv-blazor.md
+++ b/doc/en/components/general-changelog-dv-blazor.md
@@ -2,7 +2,7 @@
title: {Platform} What's New | {ProductName} | Infragistics
_description: Learn about new features in the {ProductName}.
_keywords: Changelog, What's New, {ProductName}, Infragistics
-mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "Infragistics.Controls.DataGridCellEventArgs", "Infragistics.Controls.GridBaseDirective", "MaskInput", "Shape", "RoundShape", "XamRadialGauge"]
+mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "Infragistics.Controls.DataGridCellEventArgs", "Infragistics.Controls.GridBaseDirective", "MaskInput", "Shape", "RoundShape", "XamRadialGauge, XamLinearGauge, XamBulletGraph, XamTreemap", "XamRadialChart"]
sharedComponents: ["Grid", "TreeGrid", "HierarchicalGrid"]
namespace: Infragistics.Controls.Charts
---
@@ -10,6 +10,25 @@ namespace: Infragistics.Controls.Charts
All notable changes for each version of {ProductName} are documented on this page.
+## **{PackageVerChanges-23-2-APR2}**
+
+### {PackageCharts} (Charts)
+
+Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data.
+
+- `XamBulletGraph`
+ - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time.
+- `XamLinearGauge`
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamRadialGauge`
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamTreemap`
+ - Now exposes a `HighlightingMode` property that allows you to configure the mouse-over highlighting of the items in the tree map. This property takes two options: `Brighten` where the highlight will apply to the item that you hover the mouse over only, and `FadeOthers` where the highlight of the hovered item will remain the same, but everything else will fade out. This highlight is animated, and can be controlled using the `HighlightingTransitionDuration` property.
+
+## **{PackageVerChanges-23-2-APR}**
+
+- `Bug Fixes`
+
## **{PackageVerChanges-23-2-MAR}**
### New Components
@@ -31,7 +50,12 @@ All notable changes for each version of {ProductName} are documented on this pag
- `Select`, `Dropdown`
- exposed `selectedItem`, `items` and `groups` getters
- `XamRadialGauge`
+ - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position.
- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamRadialChart`
+ - New Label Mode
+ The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area.
### General
diff --git a/doc/en/components/general-changelog-dv-react.md b/doc/en/components/general-changelog-dv-react.md
index 54937e4cf..28204b91b 100644
--- a/doc/en/components/general-changelog-dv-react.md
+++ b/doc/en/components/general-changelog-dv-react.md
@@ -2,7 +2,7 @@
title: {Platform} What's New | {ProductName} | Infragistics
_description: Learn about new features in the {ProductName}.
_keywords: Changelog, What's New, {ProductName}, Infragistics
-mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Grid", "GridSelectionMode", DataGridCellEventArgs, DataGridSelectionMode, DataSourceSummaryOperand, "XamRadialGauge"]
+mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Grid", "GridSelectionMode", DataGridCellEventArgs, DataGridSelectionMode, DataSourceSummaryOperand, "XamRadialGauge", "XamRadialChart"]
namespace: Infragistics.Controls.Charts
---
# {ProductName} Changelog
@@ -11,14 +11,29 @@ All notable changes for each version of {ProductName} are documented on this pag
## **{PackageVerChanges-23-2-MAR}**
+### {PackageCharts}
+
+ - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data.
+
+- `XamRadialChart`
+ - New Label Mode
+ The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area.
+
### {PackageGrids}
- New [`HierarchicalGrid`](grids/hierarchical-grid/overview.md) component
### {PackageGauges}
-- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
-
+- `XamRadialGauge`
+ - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position.
+ - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamLinearGauge`
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamBulletGraph`
+ - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time.
+
### {PackageCommon}
- New `Textarea` component
diff --git a/doc/en/components/general-changelog-dv-wc.md b/doc/en/components/general-changelog-dv-wc.md
index b635b5f10..d03e13944 100644
--- a/doc/en/components/general-changelog-dv-wc.md
+++ b/doc/en/components/general-changelog-dv-wc.md
@@ -2,7 +2,7 @@
title: {Platform} What's New | {ProductName} | Infragistics
_description: Learn about new features in the {ProductName}.
_keywords: Changelog, What's New, {ProductName}, Infragistics
-mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "XamRadialGauge"]
+mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "Infragistics.Controls.Grid", "Infragistics.Controls.GridSelectionMode", "XamRadialGauge", "XamRadialChart"]
namespace: Infragistics.Controls.Charts
---
# {ProductName} Changelog
@@ -11,9 +11,24 @@ All notable changes for each version of {ProductName} are documented on this pag
## **{PackageVerChanges-23-2-MAR}**
+### {PackageCharts}
+
+ - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data.
+
+- `XamRadialChart`
+ - New Label Mode
+ The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area.
+
### {PackageGauges}
-- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+- `XamRadialGauge`
+ - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position.
+ - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamLinearGauge`
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamBulletGraph`
+ - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time.
### {PackageGrids}
diff --git a/doc/en/components/general-changelog-dv.md b/doc/en/components/general-changelog-dv.md
index 09522d6ec..eb8c6cc6b 100644
--- a/doc/en/components/general-changelog-dv.md
+++ b/doc/en/components/general-changelog-dv.md
@@ -2,7 +2,7 @@
title: {Platform} What's New | {ProductName} | Infragistics
_description: Learn about new features in the {ProductName}.
_keywords: Changelog, What's New, {ProductName}, Infragistics
-mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "XamRadialGauge"]
+mentionedTypes: ["SeriesViewer", "XYChart", "DomainChart", "XamDataChart", "Toolbar", "XamGeographicMap", "DatePicker", "MultiColumnComboBox", "CategoryChart", "CrosshairLayer", "FinalValueLayer", "CalloutLayer", "DataLegend", "XamRadialGauge", "XamRadialChart"]
namespace: Infragistics.Controls.Charts
---
# {ProductName} Changelog
@@ -17,9 +17,24 @@ All notable changes for each version of {ProductName} are documented on this pag
## **{PackageVerChanges-23-2-MAR}**
+### {PackageCharts}
+
+ - New Data Filtering via the `InitialFilter` property. Apply filter expressions to filter the chart data to a subset of records. Can be used for drill down large data.
+
+- `XamRadialChart`
+ - New Label Mode
+ The `CategoryAngleAxis` for the now exposes a `LabelMode` property that allows you to further configure the location of the labels. This allows you to toggle between the default mode by selecting the `Center` enum, or use the new mode, `ClosestPoint`, which will bring the labels closer to the circular plot area.
+
### {PackageGauges}
-- New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+- `XamRadialGauge`
+ - New title/subtitle properties. `TitleText`, `SubtitleText` will appear near the bottom the gauge. In addition, the various title/subtitle font properties were added such as `TitleFontSize`, `TitleFontFamily`, `TitleFontStyle`, `TitleFontWeight` and `TitleExtent`. Finally, the new `TitleDisplaysValue` will allow the value to correspond with the needle's position.
+ - New `OpticalScalingEnabled` and `OpticalScalingSize` properties for the `XamRadialGauge`. This new feature will manage the size at which labels, titles, and subtitles of the gauge have 100% optical scaling. You can read more about this new feature [here](radial-gauge.md#optical-scaling)
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamLinearGauge`
+ - New highlight needle was added. `HighlightValue` and `HighlightValueDisplayMode` when both are provided a value and 'Overlay' setting, this will make the main needle to appear faded and a new needle will appear.
+- `XamBulletGraph`
+ - The Performance bar will now reflect a difference between the value and new `HighlightValue` when the `HighlightValueDisplayMode` is applied to the 'Overlay' setting. The highlight value will show a filtered/subset completed measured percentage as a filled in color while the remaining bar's appearance will appear faded to the assigned value, illustrating the performance in real-time.
## **{PackageVerChanges-23-2-JAN}**
diff --git a/doc/en/components/grids/_shared/advanced-filtering.md b/doc/en/components/grids/_shared/advanced-filtering.md
index 671f1df66..f33291016 100644
--- a/doc/en/components/grids/_shared/advanced-filtering.md
+++ b/doc/en/components/grids/_shared/advanced-filtering.md
@@ -39,68 +39,91 @@ To enable the advanced filtering, the `AllowAdvancedFiltering` input property sh
{ComponentSelector}>
```
+
+
+```html
+
+
+
+```
+```ts
+constructor() {
+ let grid = document.getElementById("grid") as IgcGridComponent;
+ grid.data = this.data
+}
+```
+
+```tsx
+
+
+
+```
+
```razor
<{ComponentSelector} Data=data AutoGenerate="true" AllowAdvancedFiltering="true">
{ComponentSelector}>
```
+
-```razor
-
-
-
-```
-
-
-
```html
-<{ComponentSelector} id="grid" auto-generate="true" allow-advanced-filtering="true">
+
-{ComponentSelector}>
+
```
```ts
constructor() {
- let grid = (document.getElementById("grid") as IgcGridComponent);
- grid.data = this.data
+ let treeGrid = document.getElementById("treeGrid") as IgcTreeGridComponent;
+ treeGrid.data = this.data
}
```
-
-```html
-
-
-
+```tsx
+
+
+
```
+```razor
+
+
+
+```
+
+
+```html
+
+
+
+```
```ts
constructor() {
- let grid = document.getElementById("grid") as IgcTreeGridComponent;
- grid.data = this.data
+ let hierarchicalGrid = document.getElementById("hierarchicalGrid") as IgcHierarchicalGridComponent;
+ hierarchicalGrid.data = this.data
}
```
-
+
-
-
-```html
-<{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowAdvancedFiltering="true">
-
-
-
-
-
-{ComponentSelector}>
+
+
+```razor
+
+
+
```
-
+
+
+
```tsx
-<{ComponentSelector} data={nwindData} autoGenerate="false" ref={gridRef} allowAdvancedFiltering="true">
+
-{ComponentSelector}>
+
```
+
The advanced filtering generates a `FilteringExpressionsTree` which is stored in the `AdvancedFilteringExpressionsTree` input property. You could use the `AdvancedFilteringExpressionsTree` property to set an initial state of the advanced filtering.
@@ -543,27 +566,22 @@ Don't forget to include the themes in the same way as it was demonstrated above.
In addition to the predefined themes, the grid could be further customized by setting some of the available [CSS properties](../theming.md).
In case you would like to change some of the colors, you need to set a class for the grid first:
+
```html
-
-```
-
-```razor
-
+<{ComponentSelector} class="grid">{ComponentSelector}>
```
+
-
-
-
-```html
-
+
+```tsx
+<{ComponentSelector} className="grid">{ComponentSelector}>
```
+
```razor
-
+<{ComponentSelector} class="grid">{ComponentSelector}>
```
-
-
Then set the related CSS properties to this class:
```css
diff --git a/doc/en/components/grids/_shared/cell-editing.md b/doc/en/components/grids/_shared/cell-editing.md
index e9fbe6b23..5e16e8c52 100644
--- a/doc/en/components/grids/_shared/cell-editing.md
+++ b/doc/en/components/grids/_shared/cell-editing.md
@@ -84,7 +84,9 @@ public updateCell() {
```
```razor
-this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel')
+@code {
+ this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel');
+}
```
@@ -96,7 +98,9 @@ public updateCell() {
```
```razor
-this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel')
+@code {
+ this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel');
+}
```
@@ -116,9 +120,11 @@ public updateCell() {
```razor
-private UpdateCell() {
- IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel");
- cell.Update(70);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel");
+ cell.Update(70);
+ }
}
```
@@ -145,9 +151,11 @@ public updateCell() {
```
```razor
-private UpdateCell() {
- IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age");
- cell.Update(9999);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age");
+ cell.Update(9999);
+ }
}
```
@@ -163,9 +171,11 @@ public updateCell() {
```
```razor
-private UpdateCell() {
- IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel");
- cell.Update(70);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel");
+ cell.Update(70);
+ }
}
```
@@ -232,6 +242,8 @@ This code is used in the sample below which implements an [SelectComponent](../s
If you want to provide a custom template which will be applied to a cell, you can pass such template either to the cell itself, or to its header. First create the column as you usually would:
+
+
@@ -252,7 +264,7 @@ If you want to provide a custom template which will be applied to a cell, you ca
@@ -260,6 +272,19 @@ If you want to provide a custom template which will be applied to a cell, you ca
```
+
+```razor
+
+
+```
+
+
and pass the template:
```razor
@@ -294,7 +319,6 @@ igRegisterScript("WebGridCellEditCellTemplate", (ctx) => {
field="Race"
data-type="string"
editable="true"
- name="column1"
id="column1">
```
@@ -342,73 +366,88 @@ public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
field="Category"
data-type="string"
editable="true"
- name="column1"
id="column1">
```
and pass the templates to this column in the index.ts file:
-```typescript
+```ts
+
constructor() {
- var treeGrid = document.getElementById('treeGrid') as {ComponentName}Component;
+ var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
var column1 = document.getElementById('column1') as IgcColumnComponent;
- treeGrid.data = this.ordersTreeData;
- column1.inlineEditorTemplate = this.webTreeGridCellEditCellTemplate;
+ treeGrid.data = this.webGridCellEditSampleRoleplay;
+ column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
+ column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
+ column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
+public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
+ let cellValues: any = [];
+ let uniqueValues: any = [];
+ for(const i of (this.webGridCellEditSampleRoleplay as any)){
+ const field: string = ctx.cell.column.field;
+ if(uniqueValues.indexOf(i[field]) === -1 )
+ {
+ cellValues.push(html`${(i[field])}`);
+ uniqueValues.push(i[field]);
+ }
+ }
+ return html`
+ ctx.cell.editValue = e.detail.value}>
+ ${cellValues}
+
+ `;
+}
```
+
+
+
+```html
+
+
+```
+
+and pass the templates to this column in the index.ts file:
-
```ts
constructor() {
- var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
- var column1 = document.getElementById('column1') as IgcColumnComponent;
- var column2 = document.getElementById('column2') as IgcColumnComponent;
- var column3 = document.getElementById('column3') as IgcColumnComponent;
-
- treeGrid.data = this.webGridCellEditSampleRoleplay;
- column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
- column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
- column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
-}
-
-private _webGridCellEditSampleRoleplay: WebGridCellEditSampleRoleplay = null;
-public get webGridCellEditSampleRoleplay(): WebGridCellEditSampleRoleplay {
- if (this._webGridCellEditSampleRoleplay == null)
- {
- this._webGridCellEditSampleRoleplay = new WebGridCellEditSampleRoleplay();
- }
+ var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent;
+ var column1 = document.getElementById('column1') as IgcColumnComponent;
- return this._webGridCellEditSampleRoleplay;
+ hierarchicalGrid.data = this.singersData;
+ column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
- let cellValues: any = [];
- let uniqueValues: any = [];
- for(const i of (this.webGridCellEditSampleRoleplay as any)){
- const field: string = ctx.cell.column.field;
- if(uniqueValues.indexOf(i[field]) === -1 )
- {
- cellValues.push(html`${(i[field])}`);
- uniqueValues.push(i[field]);
- }
+ let cellValues: any = [];
+ let uniqueValues: any = [];
+ for(const i of (this.singersData as any)){
+ const field: string = ctx.cell.column.field;
+ if(uniqueValues.indexOf(i[field]) === -1 )
+ {
+ cellValues.push(html`${(i[field])}`);
+ uniqueValues.push(i[field]);
}
- return html`
- ctx.cell.editValue = e.detail.value}>
- ${cellValues}
-
- `;
+ }
+ return html`
+ ctx.cell.editValue = e.detail.value}>
+ ${cellValues}
+
+ `;
}
```
-
+
-
-
If you want to provide a custom template which will be applied to a cell, you can pass such template either to the cell itself, or to its header. First create the column as you usually would:
@@ -448,13 +487,9 @@ const webGridCellEditCellTemplate = useCallback((ctx: IgrCellTemplateContext) =>
useEffect(() => {
const column1 = grid1Ref.current.getColumnByName('column1');
- const column2 = grid1Ref.current.getColumnByName('column2');
- const column3 = grid1Ref.current.getColumnByName('column3');
grid1Ref.current.data = webGridCellEditSampleRoleplay;
column1.inlineEditorTemplate = webGridCellEditCellTemplate;
- column2.inlineEditorTemplate = webGridCellEditCellTemplate;
- column3.inlineEditorTemplate = webGridCellEditCellTemplate;
}, [webGridCellEditSampleRoleplay, webGridCellEditCellTemplate]);
@@ -621,9 +656,11 @@ this.grid.addRow(record);
```razor
-//Assuming we have a `GetNewRecord` method returning the new row data.
-const record = this.GetNewRecord();
-this.GridRef.AddRow(record);
+@code {
+ //Assuming we have a `GetNewRecord` method returning the new row data.
+ const record = this.GetNewRecord();
+ this.GridRef.AddRow(record);
+}
```
@@ -661,7 +698,14 @@ public addRow() {
// Adding a new record
// Assuming we have a `getNewRecord` method returning the new row data
const record = this.getNewRecord();
- this.hierarchicalGrid.addRow(record, 1);
+ this.hierarchicalGrid.addRow(record);
+}
+```
+```razor
+@code {
+ //Assuming we have a `GetNewRecord` method returning the new row data.
+ const record = this.GetNewRecord();
+ this.HierarchicalGridRef.AddRow(record);
}
```
@@ -708,18 +752,20 @@ row.update(newData);
```razor
-// Updating the whole row
-this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+@code {
+ // Updating the whole row
+ this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID);
-// Just a particular cell through the Grid API
-this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+ // Just a particular cell through the Grid API
+ this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
-// Directly using the cell `update` method
-this.selectedCell.Update(newData);
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
-// Directly using the row `update` method
-const row = this.grid.GetRowByKey(rowID);
-row.Update(newData);
+ // Directly using the row `update` method
+ IgbRowType row = this.grid.GetRowByKey(rowID);
+ row.Update(newData);
+}
```
@@ -740,18 +786,20 @@ row.update(newData);
```
```razor
-// Updating the whole row
-this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+@code {
+ // Updating the whole row
+ this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
-// Just a particular cell through the Tree Grid API
-this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+ // Just a particular cell through the Tree Grid API
+ this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
-// Directly using the cell `update` method
-this.selectedCell.Update(newData);
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
-// Directly using the row `update` method
-const row = this.treeGrid.GetRowByKey(rowID);
-row.Update(newData);
+ // Directly using the row `update` method
+ IgbRowType row = this.treeGrid.GetRowByKey(rowID);
+ row.Update(newData);
+}
```
@@ -771,6 +819,23 @@ this.selectedCell.update(newData);
const row = this.hierarchicalGrid.getRowByKey(rowID);
row.update(newData);
```
+
+```razor
+@code {
+ // Updating the whole row
+ this.hierarchicalGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+
+ // Just a particular cell through the Tree Grid API
+ this.hierarchicalGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
+
+ // Directly using the row `update` method
+ IgbRowType row = this.hierarchicalGrid.GetRowByKey(rowID);
+ row.Update(newData);
+}
+```
### Deleting data from the {ComponentTitle}
@@ -795,16 +860,18 @@ row.delete();
grid1Ref.current.deleteRow(selectedCell.cellID.rowID);
// Delete row through row object
const row = grid1Ref.current.getRowByIndex(rowIndex);
-row.delete();
+row.del();
```
```razor
-// Delete row through Grid API
-this.grid.DeleteRow(this.selectedCell.cellID.rowID);
-// Delete row through row object
-const row = this.grid.GetRowByIndex(rowIndex);
-row.Delete();
+@code {
+ // Delete row through Grid API
+ this.grid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.grid.GetRowByIndex(rowIndex);
+ row.Del();
+}
```
@@ -819,15 +886,18 @@ row.delete();
```
```razor
-// Delete row through Tree Grid API
-this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID);
-// Delete row through row object
-const row = this.treeGrid.GetRowByIndex(rowIndex);
-row.Delete();
+@code {
+ // Delete row through Tree Grid API
+ this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.treeGrid.GetRowByIndex(rowIndex);
+ row.Del();
+}
```
+
```typescript
// Delete row through Grid API
this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
@@ -835,6 +905,27 @@ this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
const row = this.hierarchicalGrid.getRowByIndex(rowIndex);
row.delete();
```
+
+
+
+```typescript
+// Delete row through Grid API
+this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
+// Delete row through row object
+const row = this.hierarchicalGrid.getRowByIndex(rowIndex);
+row.del();
+```
+
+
+```razor
+@code {
+ // Delete row through Grid API
+ this.hierarchicalGrid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.hierarchicalGrid.GetRowByIndex(rowIndex);
+ row.Del();
+}
+```
These can be wired to user interactions, not necessarily related to the `{ComponentName}` for example, a button click:
@@ -902,6 +993,7 @@ constructor() {
```ts
constructor() {
var hGrid = document.getElementById('hGrid') as IgcHierarchicalGridComponent;
+ this.webHierarchicalGridCellEdit = this.webHierarchicalGridCellEdit.bind(this);
hGrid.addEventListener("cellEdit", this.webHierarchicalGridCellEdit);
}
```
@@ -1039,31 +1131,68 @@ Here, we are validating two columns. If the user tries to set an invalid value f
```typescript
-export class MyHGridEventsComponent {
- public handleCellEdit(event: IGridEditEventArgs) {
- const today = new Date();
- const column = event.column;
- if (column.field === 'Debut') {
- if (event.newValue > today.getFullYear()) {
- this.toast.message = 'The debut date must be in the past!';
- this.toast.open();
- event.cancel = true;
- }
- } else if (column.field === 'LaunchDate') {
- if (event.newValue > new Date()) {
- this.toast.message = 'The launch date must be in the past!';
- this.toast.open();
- event.cancel = true;
- }
+public webHierarchicalGridCellEdit(event: CustomEvent): void {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
}
}
}
```
+```razor
+*** In JavaScript ***
+igRegisterScript("HandleCellEdit", (ev) => {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
+ }
+ }
+}, false);
+```
+
Here, we are validating two columns. If the user tries to change an artist's **Debut** year or an album's **Launch Date**, the grid will not allow any dates that are greater than today.
+
+
+```tsx
+public handleCellEdit(sender: IgrHierarchicalGrid, event: IgrGridEditEventArgs): void {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
+ }
+ }
+}
+```
+
+
+
The result of the above validation being applied to our `{ComponentName}` can be seen in the below demo:
`sample="/{ComponentSample}/editing-events", height="650", alt="{Platform} {ComponentTitle} Editing Event Example"`
@@ -1107,6 +1236,10 @@ Then set the related CSS properties for that class:
```
+```tsx
+
+```
+
Then set the related CSS properties for that class:
```css
@@ -1117,6 +1250,29 @@ Then set the related CSS properties for that class:
```
+
+```html
+
+```
+
+```razor
+
+```
+
+```tsx
+
+```
+
+Then set the related CSS properties for that class:
+
+```css
+.hierarchicalGrid {
+ --ig-grid-edit-mode-color: orange;
+ --ig-grid-cell-editing-background: lightblue;
+}
+```
+
+
### Styling Example
`sample="/{ComponentSample}/cell-editing-styling", height="650", alt="{Platform} {ComponentTitle} Cell Editing Styling Example"`
diff --git a/doc/en/components/grids/_shared/cell-selection.md b/doc/en/components/grids/_shared/cell-selection.md
index 35ce4c5e4..c9b55c2f6 100644
--- a/doc/en/components/grids/_shared/cell-selection.md
+++ b/doc/en/components/grids/_shared/cell-selection.md
@@ -7,7 +7,7 @@ sharedComponents: ["Grid", "TreeGrid", "HierarchicalGrid"]
namespace: Infragistics.Controls
---
-# {Platform} Cell Selection
+# {Platform} {ComponentTitle} Cell Selection
The {ProductName} Cell Selection in {Platform} {ComponentTitle} enables rich data select capabilities and offers powerful API in the `{ComponentName}` component. The {Platform} {ComponentTitle} supports three selection modes:
@@ -21,7 +21,7 @@ In the `{ComponentName}` you can specify the cell selection mode on grid level.
Let's dive deeper into each of these options.
-## {Platform} Cell Selection Example
+## {Platform} {ComponentTitle} Cell Selection Example
The sample below demonstrates the three types of `{ComponentName}`'s **cell selection** behavior. Use the buttons below to enable each of the available selection modes. A brief description will be provided on each button interaction through a snackbar message box.
@@ -93,7 +93,7 @@ If you want to disable cell selection you can just set `CellSelection` to **none
Below are the methods that you can use in order to select ranges, clear selection or get selected cells data.
-
+
### Select range
@@ -111,7 +111,29 @@ const range = { rowStart: 2, rowEnd: 2, columnStart: 1, columnEnd: 1 };
gridRef.current.selectRange(range);
```
-
+
+
+```razor
+<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true><{ComponentSelector}>
+
+@code {
+ private {ComponentSelector} grid;
+
+ private async void SetSelection()
+ {
+ IgbGridSelectionRange selectionRange = new IgbGridSelectionRange();
+ selectionRange.ColumnStart = 1;
+ selectionRange.ColumnEnd = 1;
+ selectionRange.RowStart = 2;
+ selectionRange.RowEnd = 2;
+
+ this.grid.SelectRange(new IgbGridSelectionRange[] {});
+ }
+}
+```
+
+
+
### Clear cell selection
@@ -144,10 +166,10 @@ gridRef.current.clearCellSelection();
`GetSelectedData` will return array of the selected data in Dictionary format. Examples below:
```razor
-
+<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true><{ComponentSelector}>
@code {
- private IgbGrid grid;
+ private {ComponentSelector} grid;
private async void GetSelectedData()
{
@@ -300,6 +322,35 @@ Then set the related CSS properties for that class:
+
+
+
+```ts
+
+```
+
+
+```tsx
+
+```
+
+```razor
+
+```
+
+Then set the related CSS properties for that class:
+
+```css
+.hGrid {
+ --ig-grid-cell-selected-text-color: #fff;
+ --ig-grid-cell-active-border-color: #f2c43c;
+ --ig-grid-cell-selected-background: #0062a3;
+ --ig-grid-cell-editing-background: #0062a3;
+}
+```
+
+
+
### Demo
`sample="/{ComponentSample}/cell-selection-style", height="620", alt="{Platform} {ComponentTitle} Cell Selection Styling Example"`
@@ -384,7 +435,7 @@ With the custom theme applied, the selected grid cells are highlighted with our
## Additional Resources
-
+
* [Selection](selection.md)
* [Row Selection](row-selection.md)
* [Filtering](filtering.md)
diff --git a/doc/en/components/grids/_shared/collapsible-column-groups.md b/doc/en/components/grids/_shared/collapsible-column-groups.md
index 49dce41e5..7209d1ddc 100644
--- a/doc/en/components/grids/_shared/collapsible-column-groups.md
+++ b/doc/en/components/grids/_shared/collapsible-column-groups.md
@@ -214,12 +214,21 @@ public indTemplate = (ctx: IgcColumnTemplateContext) => {
```
```tsx
- function collapsibleIndicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) {
+
+
+
+
+
+
+
+
+
+function indicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) {
return (
;
};
```
+
Once we've set the new icon template, we also need to adjust the **DEFAULT** icon in our **DragIcon enum**, so it's properly change by the `ChangeIcon` method:
@@ -471,6 +540,91 @@ Since all of the actions will be happening _inside_ of the grid's body, that's w
With the help of the grid's row drag events you can create a grid that allows you to reorder rows by dragging them.
+
+
+
+
+```html
+
+
+```
+
+```ts
+constructor() {
+ var hGrid = this.grihGridd = document.getElementById('hGrid') as IgcHierarchicalGridComponent;
+ hGrid.addEventListener("rowDragEnd", this.webHierarchicalGridReorderRowHandler)
+}
+```
+
+
+```tsx
+
+
+```
+
+```razor
+
+
+// In JavaScript
+igRegisterScript("WebHierarchicalGridReorderRowHandler", (args) => {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = document.getElementsByTagName("igc-hierarchical-grid")[0];
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ // remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+}, false);
+
+function getCurrentRowIndex(rowList, cursorPosition) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+}
+```
+
+
+
+
+
+
+
+```html
+
+
+```
+
+```ts
+constructor() {
+ var tGrid = this.tGrid = document.getElementById('tGrid') as IgcTreeGridComponent;
+ tGrid.addEventListener("rowDragStart", this.webTreeGridReorderRowStartHandler);
+ tGrid.addEventListener("rowDragEnd", this.webTreeGridReorderRowHandler);
+}
+```
+
+
+```tsx
+
+
+```
+
+```razor
+
+```
+
+
+
+
+
```html
@@ -486,11 +640,16 @@ constructor() {
```
+
+
```tsx
```
+
+
+
```razor
@@ -520,6 +679,9 @@ function getCurrentRowIndex(rowList, cursorPosition) {
return -1;
}
```
+
+
+
@@ -619,6 +781,7 @@ function getCurrentRowIndex(rowList: any[], cursorPosition) {
+
```typescript
@@ -688,9 +851,194 @@ export class TreeGridRowReorderComponent {
```
+
+
+
+
+
+```tsx
+public webTreeGridReorderRowStartHandler(args){
+ const draggedRow = args.detail.dragData;
+ if(draggedRow.expanded){
+ draggedRow.expanded = false;
+ }
+ }
+
+ public webTreeGridReorderRowHandler(args): void {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = this.treeGrid;
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ const draggedRow = args.detail.dragData.data;
+ const childRows = this.findChildRows(grid.data, draggedRow);
+ //remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+ // reinsert the child rows
+ childRows.reverse().forEach(childRow => {
+ grid.data.splice(currRowIndex + 1, 0, childRow);
+ });
+ }
+
+ private findChildRows(rows: any[], parent: any): any[] {
+ const childRows: any[] = [];
+ rows.forEach(row => {
+ if (row.ParentID === parent.ID) {
+ childRows.push(row);
+ // Recursively find children of current row
+ const grandchildren = this.findChildRows(rows, row);
+ childRows.push(...grandchildren);
+ }
+ });
+ return childRows;
+ }
+
+ public getCurrentRowIndex(rowList: any[], cursorPosition: any) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+ }
+```
+
+
+
+
+
+
+
+```ts
+public webTreeGridReorderRowStartHandler(args: CustomEvent): void {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = this.treeGrid;
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ const draggedRow = args.detail.dragData.data;
+ const childRows = this.findChildRows(grid.data, draggedRow);
+ //remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+ // reinsert the child rows
+ childRows.reverse().forEach(childRow => {
+ grid.data.splice(currRowIndex + 1, 0, childRow);
+ });
+ }
+
+ private findChildRows(rows: any[], parent: any): any[] {
+ const childRows: any[] = [];
+ rows.forEach(row => {
+ if (row.ParentID === parent.ID) {
+ childRows.push(row);
+ // Recursively find children of current row
+ const grandchildren = this.findChildRows(rows, row);
+ childRows.push(...grandchildren);
+ }
+ });
+ return childRows;
+ }
+
+ public getCurrentRowIndex(rowList: any[], cursorPosition: any) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+ }
+```
+
+
+
+
+
+
+
+```razor
+//in JavaScript
+igRegisterScript("WebTreeGridReorderRowStartHandler", (args) => {
+ const draggedRow = args.detail.dragElement;
+ const row = this.treeGrid.getRowByIndex(draggedRow.getAttribute('data-rowindex'));
+ if (row.expanded) {
+ row.expanded = false;
+ }
+}, false);
+
+igRegisterScript("WebTreeGridReorderRowHandler", (args) => {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = document.getElementsByTagName("igc-tree-grid")[0];
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-tree-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ // remove the row that was dragged and place it onto its new location
+ const draggedRow = args.detail.dragData.data;
+ const childRows = this.findChildRows(grid.data, draggedRow);
+ //remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+ // reinsert the child rows
+ childRows.reverse().forEach(childRow => {
+ grid.data.splice(currRowIndex + 1, 0, childRow);
+ });
+}, false);
+
+function findChildRows(rows, parent) {
+ const childRows = [];
+ rows.forEach(row => {
+ if (row.ParentID === parent.ID) {
+ childRows.push(row);
+ // Recursively find children of current row
+ const grandchildren = this.findChildRows(rows, row);
+ childRows.push(...grandchildren);
+ }
+ });
+ return childRows;
+}
+
+function getCurrentRowIndex(rowList, cursorPosition) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+}
+```
+
+
+
+
+
```typescript
export class HGridRowReorderComponent {
public rowDragStart(args: any): void {
@@ -742,6 +1090,98 @@ export class HGridRowReorderComponent {
}
```
+
+
+
+```tsx
+ public webHierarchicalGridReorderRowHandler(sender: IgrHierarchicalGrid, args: IgrRowDragEndEventArgs): void {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = this.hierarchicalGrid;
+ grid.collapseAll();
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ // remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+ }
+
+ public getCurrentRowIndex(rowList: any[], cursorPosition: any) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+ }
+```
+
+
+
+```typescript
+public webGridReorderRowHandler(args: CustomEvent): void {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = document.getElementsByTagName("igc-hierarchical-grid")[0] as any;
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ // remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+}
+public getCurrentRowIndex(rowList: any[], cursorPosition) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+}
+```
+
+
+
+```razor
+
+
+//In JavaScript
+igRegisterScript("WebGridReorderRowHandler", (args) => {
+ const ghostElement = args.detail.dragDirective.ghostElement;
+ const dragElementPos = ghostElement.getBoundingClientRect();
+ const grid = document.getElementsByTagName("igc-hierarchical-grid")[0];
+ const rows = Array.prototype.slice.call(document.getElementsByTagName("igx-hierarchical-grid-row"));
+ const currRowIndex = this.getCurrentRowIndex(rows,
+ { x: dragElementPos.x, y: dragElementPos.y });
+ if (currRowIndex === -1) { return; }
+ // remove the row that was dragged and place it onto its new location
+ grid.deleteRow(args.detail.dragData.key);
+ grid.data.splice(currRowIndex, 0, args.detail.dragData.data);
+}, false);
+
+function getCurrentRowIndex(rowList, cursorPosition) {
+ for (const row of rowList) {
+ const rowRect = row.getBoundingClientRect();
+ if (cursorPosition.y > rowRect.top + window.scrollY && cursorPosition.y < rowRect.bottom + window.scrollY &&
+ cursorPosition.x > rowRect.left + window.scrollX && cursorPosition.x < rowRect.right + window.scrollX) {
+ // return the index of the targeted row
+ return parseInt(row.attributes["data-rowindex"].value);
+ }
+ }
+ return -1;
+}
+```
+
+
With these few easy steps, you've configured a grid that allows reordering rows via drag/drop! You can see the above code in action in the following demo.
diff --git a/doc/en/components/grids/_shared/row-pinning.md b/doc/en/components/grids/_shared/row-pinning.md
index 197fe650b..43103e2cd 100644
--- a/doc/en/components/grids/_shared/row-pinning.md
+++ b/doc/en/components/grids/_shared/row-pinning.md
@@ -31,7 +31,7 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with
{ComponentSelector}>
```
-
+
```razor
<{ComponentSelector} Width="100%"
Height="100%"
@@ -55,8 +55,10 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with
{ComponentSelector}>
```
+
+
```html
<{ComponentSelector} auto-generate="false">
@@ -66,8 +68,10 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with
{ComponentSelector}>
```
+
+
```tsx
<{ComponentSelector}>
@@ -77,6 +81,7 @@ The built-in row pinning UI is enabled by adding an `ActionStrip` component with
{ComponentSelector}>
```
+
## Row Pinning API
@@ -146,6 +151,7 @@ public rowPinning(event) {
```
+
```tsx
function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) {
event.detail.insertAtIndex = 0;
@@ -154,6 +160,7 @@ function rowPinning(grid: IgrGridBaseDirective, event: IgrPinRowEventArgs ) {
<{ComponentSelector} autoGenerate="true" rowPinning={rowPinning}>
{ComponentSelector}>
```
+
```razor
<{ComponentSelector} Width="100%"
@@ -175,7 +182,6 @@ function rowPinningHandler(event) {
igRegisterScript("rowPinningHandler", rowPinningHandler, false);
```
-
## Pinning Position
@@ -225,7 +231,16 @@ grid.pinning = { rows: RowPinningPosition.Bottom };
}
}
```
-
+
+
+```tsx
+<{ComponentSelector} id="dataGrid" autoGenerate="true">
+{ComponentSelector}>
+
+var grid = document.getElementById("dataGrid") as {ComponentSelector};
+grid.pinning = { rows: RowPinningPosition.Bottom };
+```
+
## Custom Row Pinning UI
@@ -236,6 +251,7 @@ You can define your custom UI and change the pin state of the rows via the relat
Let's say that instead of an action strip you would like to show a pin icon in every row allowing the end-user to click and change a particular row's pin state.
This can be done by adding an extra column with a cell template containing the custom icon.
+
```razor
@@ -270,7 +286,6 @@ igRegisterScript("WebGridRowPinCellTemplate", (ctx) => {
```
-On click of the custom icon the pin state of the related row can be changed using the row's API methods.
```typescript
public togglePinning(row: IgxGridRow, event) {
@@ -305,10 +320,12 @@ public pinCellTemplate = (ctx: IgcCellTemplateContext) => {
return html` this.togglePinning(index)}>📌`;
}
```
+
+
```tsx
function cellPinCellTemplate(ctx: IgrCellTemplateContext) {
- const index = ctx.dataContext.cell.id.rowIndex;
+ const index = ctx.dataContext.cell.row.index;
return (
<>
toggleRowPin(index)}>📌
@@ -321,9 +338,106 @@ function cellPinCellTemplate(ctx: IgrCellTemplateContext) {
{ComponentSelector}>
```
+
-On click of the custom icon the pin state of the related row can be changed using the row's API methods.
+
+
+
+```razor
+
+
+// In Javascript
+
+igRegisterScript("WebHierarchicalGridRowPinCellTemplate", (ctx) => {
+ var html = window.igTemplating.html;
+ window.toggleRowPin = function toggleRowPin(row) {
+ row.pinned = !row.pinned;
+ }
+ const row = ctx.cell.row;
+ return html`
+ 📌
+
`;
+}, false);
+```
+
+
+```html
+<{ComponentSelector} [data]="data" [primaryKey]="'ID'" [autoGenerate]="false">
+
+
+
+ {{cell.row.pinned ? 'lock' : 'lock_open'}}
+
+
+
+
+
+
+
+{ComponentSelector}>
+```
+
+
+```typescript
+public togglePinning(row: IgxGridRow, event) {
+ event.preventDefault();
+ if (row.pinned) {
+ row.unpin();
+ } else {
+ row.pin();
+ }
+}
+```
+
+
+
+```html
+<{ComponentSelector} id="grid" primary-key="ID" auto-generate="false">
+
+
+
+{ComponentSelector}>
+```
+
+```typescript
+constructor() {
+ var grid = document.getElementById('grid') as {ComponentName}Component;
+ var column = document.getElementById('column1') as IgcColumnComponent;
+ grid.data = this.data;
+ column.bodyTemplate = this.pinCellTemplate;
+}
+
+public pinCellTemplate = (ctx: IgcCellTemplateContext) => {
+ const row = ctx.cell.row;
+ return html` this.togglePinning(row)}>📌`;
+}
+```
+
+
+
+```tsx
+function cellPinCellTemplate(ctx: IgrCellTemplateContext) {
+ const row = ctx.dataContext.cell.row;
+ return (
+ <>
+ toggleRowPin(row)}>📌
+ >
+ );
+}
+
+<{ComponentSelector} primaryKey="ID" autoGenerate="false">
+
+
+
+{ComponentSelector}>
+```
+
+
+
+
+
+On click of the custom icon the pin state of the related row can be changed using the row's API methods.
```typescript
public togglePinning(index: number) {
@@ -339,6 +453,24 @@ function toggleRowPin(index: number) {
grid.getRowByIndex(index).pinned = !grid.getRowByIndex(index).pinned;
}
```
+
+
+
+On click of the custom icon the pin state of the related row can be changed using the row's API methods.
+
+```typescript
+public togglePinning(row: IgcRowType) {
+ row.pinned = !row.pinned;
+}
+```
+
+
+```tsx
+function toggleRowPin(row: IgrRowType) {
+ row.pinned = !row.pinned;
+}
+```
+
#### Demo
diff --git a/doc/en/components/grids/_shared/row-selection.md b/doc/en/components/grids/_shared/row-selection.md
index 11c9ee7bb..ee9fd7391 100644
--- a/doc/en/components/grids/_shared/row-selection.md
+++ b/doc/en/components/grids/_shared/row-selection.md
@@ -72,13 +72,12 @@ Single row selection can now be easily set up, the only thing you need to do, is
```
```ts
constructor() {
- const grid = document.getElementById('grid') as IgcGridComponent;
+ const grid = document.getElementById('grid') as {ComponentName}Component;
grid.data = this.data;
grid.addEventListener("rowSelectionChanging", this.handleRowSelection);
}
```
-
-```typescript
+```ts
public handleRowSelection(args: IgcRowSelectionEventArgs) {
if (args.detail.added.length && args.detail.added[0] === 3) {
args.detail.cancel = true;
@@ -185,6 +184,12 @@ To enable cascade row selection in the `{ComponentName}` just set the `RowSelect
{ComponentSelector}>
```
+```tsx
+
+
+```
+
In this mode a parent's selection state entirely depends on the selection state of its children. When a parent has some selected and some deselected children, its checkbox is in an indeterminate state.
@@ -223,6 +228,7 @@ The code snippet below can be used to select one or multiple rows simultaneously
```
+
```razor
<{ComponentSelector} Width="100%"
Id="grid"
@@ -235,7 +241,7 @@ The code snippet below can be used to select one or multiple rows simultaneously
{ComponentSelector}>
Select
@code {
- public IgbGrid grid;
+ public {ComponentSelector} grid;
private async void Select()
{
object[] array = new object[] { 1,2, 5 };
@@ -243,6 +249,7 @@ The code snippet below can be used to select one or multiple rows simultaneously
}
}
```
+
```html
@@ -260,7 +267,7 @@ constructor() {
document.getElementById("select").addEventListener("click", this.onClickSelect);
}
public onClickSelect() {
- const grid = document.getElementById("grid") as IgcGridComponent;
+ const grid = document.getElementById("grid") as {ComponentName}Component;
grid.selectRows([1,2,5], true);
}
```
@@ -306,7 +313,7 @@ If you need to deselect rows programmatically, you can use the `DeselectRows` me
{ComponentSelector}>
Deselect
@code {
- public IgbGrid grid;
+ public {ComponentSelector} grid;
private async void Deselect()
{
object[] array = new object[] { 1, 2, 5 };
@@ -330,7 +337,7 @@ constructor() {
document.getElementById("deselect").addEventListener("click", this.onClickDeselect);
}
public onClickDeselect() {
- const grid = document.getElementById("grid") as IgcGridComponent;
+ const grid = document.getElementById("grid") as {ComponentName}Component;
grid.deselectRows([1,2,5]);
}
```
@@ -369,9 +376,15 @@ When there is some change in the row selection `RowSelectionChanging` event is e
```
+
+```html
+<{ComponentSelector} id="grid">
+{ComponentSelector}>
+```
+
```ts
constructor() {
- const grid = document.getElementById('grid') as IgcGridComponent;
+ const grid = document.getElementById('grid') as {ComponentName}Component;
grid.data = this.data;
grid.addEventListener("rowSelectionChanging", this.handleRowSelectionChange);
}
@@ -380,6 +393,7 @@ public handleRowSelectionChange(args) {
args.detail.cancel = true; // this will cancel the row selection
}
```
+
```tsx
function handleRowSelectionChange(args: IgrRowSelectionEventArgs) {
@@ -425,7 +439,7 @@ If you need to see which rows are currently selected, you can get their row IDs
```typescript
public getSelectedRows() {
- const grid = document.getElementById('grid') as IgcGridComponent;
+ const grid = document.getElementById('grid') as {ComponentName}Component;
const currentSelection = grid.selectedRows; // return array of row IDs
}
```
@@ -442,7 +456,7 @@ public getSelectedRows() {
{ComponentSelector}>
Get selected
@code {
- public IgbGrid grid;
+ public {ComponentSelector} grid;
private async void GetSelected()
{
var selected = this.grid.SelectedRows;
@@ -470,10 +484,9 @@ Additionally, assigning row IDs to `SelectedRows` will allow you to change the g
```ts
-
public mySelectedRows = [1, 2, 3]; // an array of row IDs
constructor() {
- const grid = document.getElementById('grid') as IgcGridComponent;
+ const grid = document.getElementById('grid') as {ComponentName}Component;
grid.data = this.data;
grid.selectedRows = this.mySelectedRows;
}
@@ -592,6 +605,7 @@ The `rowID` property can be used to get a reference of an `{ComponentSelector}`
```
+
```ts
public rowSelectorTemplate = (ctx: IgcRowSelectorTemplateContext) => {
return html`
@@ -684,7 +698,7 @@ auto-generate="true">
```ts
constructor() {
- const grid = document.getElementById('grid') as IgcGridComponent;
+ const grid = document.getElementById('grid') as {ComponentName}Component;
grid.data = this.data;
grid.headSelectorTemplate = this.headSelectorTemplate;
}
@@ -744,8 +758,7 @@ This demo shows the usage of custom header and row selectors. The latter uses `R
-
-
+
### Excel Style Row Selectors Demo
@@ -756,9 +769,7 @@ This demo uses custom templates to resemble Excel-like header and row selectors.
`sample="/{ComponentSample}/row-selection-template-excel", height="550", alt="{Platform} {ComponentTitle} Selection Template Excel Example"`
-
-
-
+
### Conditional Selection Demo
@@ -767,7 +778,6 @@ This demo prevents some rows from being selected using the `RowSelectionChanging
`sample="/{ComponentSample}/conditional-row-selectors", height="550", alt="{Platform} {ComponentTitle} Conditional Row Selectors Example"`
-
## API References
* `{ComponentName}`
@@ -776,7 +786,7 @@ This demo prevents some rows from being selected using the `RowSelectionChanging
## Additional Resources
-
+
* [Selection](selection.md)
* [Cell selection](cell-selection.md)
* [Paging](paging.md)
@@ -787,7 +797,7 @@ This demo prevents some rows from being selected using the `RowSelectionChanging
* [Column Pinning](column-pinning.md)
* [Column Resizing](column-resizing.md)
* [Virtualization and Performance](virtualization.md)
-
+
Our community is active and always welcoming to new ideas.
diff --git a/doc/en/components/grids/_shared/search.md b/doc/en/components/grids/_shared/search.md
index db3a662c3..fe336ac57 100644
--- a/doc/en/components/grids/_shared/search.md
+++ b/doc/en/components/grids/_shared/search.md
@@ -23,6 +23,7 @@ The following example represents `{ComponentName}` with search input box that al
Let's start by creating our grid and binding it to our data. We will also add some custom styles for the components we will be using!
+
```html
@@ -75,9 +76,65 @@ Let's start by creating our grid and binding it to our data. We will also add so
{ComponentSelector}>
```
+
+
+
+
+```html
+
+
+
+
+
+
+
+```
+
+
+
+```html
+
+
+
+
+
+
+
+```
+```ts
+private treeGrid: IgcTreeGridComponent;
+
+constructor() {
+ this.treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
+ this.treeGrid.data = new EmployeesFlatData();
+}
+```
+
+
+```tsx
+
+
+
+
+
+
+
+```
+
+```razor
+
+
+
+
+
+
+
+```
+
Great, and now let's prepare for the search API of our `{ComponentName}`! We can create a few properties, which can be used for storing the currently searched text and whether the search is case sensitive and/or by an exact match.
+
```typescript
@@ -119,6 +176,43 @@ const exactMatchChipRef = useRef(null);
const iconButtonNextRef = useRef(null);
const [searchText, setSearchText] = useState('')
```
+
+
+
+
+```ts
+private treeGrid: IgcTreeGridComponent;
+
+private searchBox: IgcInputComponent;
+
+private icon: IgcIconComponent;
+private nextIconButton: IgcIconButtonComponent;
+private prevIconButton: IgcIconButtonComponent;
+
+private caseSensitiveChip: IgcChipComponent;
+private exactMatchChip: IgcChipComponent;
+```
+
+
+```razor
+private IgbTreeGrid treeGrid;
+
+public string searchText = "";
+public bool caseSensitive = false;
+public bool exactMatch = false;
+```
+
+```tsx
+const gridRef = useRef(null);
+const searchIconRef = useRef(null);
+const clearIconRef = useRef(null);
+const iconButtonNextRef = useRef(null);
+const iconButtonPrevRef = useRef(null);
+const caseSensitiveChipRef = useRef(null);
+const exactMatchChipRef = useRef(null);
+const [searchText, setSearchText] = useState('');
+```
+
### {Platform} Search Box Input
@@ -149,6 +243,7 @@ When searching by an exact match, the search API will highlight as results only
The methods from above return a **number** value (the number of times the `{ComponentName}` contains the given string).
+
```html
@@ -177,14 +272,56 @@ constructor() {
public nextSearch(){
this.grid.findNext(this.searchBox.value, false, false);
}
+```
+
+
+```tsx
+function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) {
+ setSearchText(event.detail);
+}
+
+function nextSearch() {
+ gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
+}
+
+
+
+
+```
+
+
+
+```html
+
+
```
+```ts
+constructor() {
+ this.searchBox = document.getElementById('searchBox') as IgcInputComponent;
+ this.caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent;
+ this.exactMatchChip = document.getElementById('exactMatchChip') as IgcChipComponent;
+}
+public nextSearch() {
+ this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+}
+```
+```razor
+
+
+public void NextSearch()
+{
+ this.treeGrid.FindNext(this.searchText, this.caseSensitive, this.exactMatch);
+}
+```
+
```tsx
function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) {
setSearchText(event.detail);
+ gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
}
function nextSearch() {
@@ -195,6 +332,7 @@ function nextSearch() {
```
+
@@ -232,6 +370,7 @@ In order to freely search and navigate among our search results, let's create a
```
+
```razor
@@ -279,6 +418,55 @@ public nextSearch() {
}
```
+
+
+
+
+```html
+
+
+```
+```ts
+constructor() {
+ this.nextIconButton = document.getElementById('nextIconBtn') as IgcIconButtonComponent;
+ this.prevIconButton = document.getElementById('prevIconBtn') as IgcIconButtonComponent;
+ this.nextIconButton.addEventListener("click", this.nextSearch);
+ this.prevIconButton.addEventListener("click", this.prevSearch);
+}
+
+public prevSearch() {
+ this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+}
+
+public nextSearch() {
+ this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+}
+```
+
+
+```razor
+
+
+
+
+
+
+
+@code {
+ private IgbTreeGrid treeGrid;
+
+ public void PrevSearch()
+ {
+ this.treeGrid.FindPrevAsync(this.searchText, this.caseSensitive, this.exactMatch);
+ }
+
+ public void NextSearch()
+ {
+ this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch);
+ }
+}
+```
+
```tsx
function prevSearch() {
@@ -319,6 +507,7 @@ public searchKeyDown(ev) {
```
+
```html
@@ -389,6 +578,78 @@ We can also allow the users to navigate the results by using the keyboard's
+
+
+
+```html
+
+
+```
+```ts
+constructor() {
+ this.searchBox = document.getElementById('searchBox') as IgcInputComponent;
+
+ this.searchBox.addEventListener("keydown", (evt) => { this.onSearchKeydown(evt); });
+ this.searchBox.addEventListener("igcInput", (evt) => {
+ this.treeGrid.findNext(evt.detail, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+ });
+}
+
+public onSearchKeydown(evt: KeyboardEvent) {
+ if (evt.key === 'Enter' || evt.key === 'ArrowDown') {
+ evt.preventDefault();
+ this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+ } else if (evt.key === 'ArrowUp') {
+ evt.preventDefault();
+ this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+ }
+}
+```
+
+
+```tsx
+function searchKeyDown(e: KeyboardEvent) {
+ if (e.key === 'Enter' || e.key === 'ArrowDown') {
+ e.preventDefault();
+ gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
+ } else if (e.key === 'ArrowUp') {
+ e.preventDefault();
+ gridRef.current.findPrev(searchText, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
+ }
+}
+
+function handleOnSearchChange(input: IgrInput, event: IgrComponentValueChangedEventArgs) {
+ setSearchText(event.detail);
+ gridRef.current.findNext(event.detail, caseSensitiveChipRef.current.selected, exactMatchChipRef.current.selected);
+}
+
+
+
+
+```
+
+```razor
+
+
+@code {
+ private void OnSearchKeyDown(KeyboardEventArgs evt)
+ {
+ if (evt.Key == "Enter" || evt.Key == "ArrowDown") {
+ this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch);
+ } else if (evt.Key == "ArrowUp") {
+ this.treeGrid.FindPrevAsync(this.searchText, this.caseSensitive, this.exactMatch);
+ }
+ }
+
+ public void OnValueChanging(string newValue)
+ {
+ this.searchText = newValue;
+ this.treeGrid.FindNextAsync(this.searchText, this.caseSensitive, this.exactMatch);
+ }
+}
+```
+
### Case Sensitive and Exact Match
@@ -420,6 +681,7 @@ public updateExactSearch() {
```
+
Now let's allow the user to choose whether the search should be case sensitive and/or by an exact match. For this purpose we can use simple checkbox inputs and bind to its `change` event where we can use the checkbox `checked` state.
@@ -448,6 +710,32 @@ public updateSearch() {
}
```
+
+
+
+
+Now let's allow the user to choose whether the search should be case sensitive and/or by an exact match. For this purpose we can use simple selectable `Chips` and bind to the `igcSelect` event to determine when the user interacts with them.
+
+```html
+Case Sensitive
+Exact Match
+```
+
+```ts
+constructor() {
+ this.caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent;
+ this.exactMatchChip = document.getElementById('exactMatchChip') as IgcChipComponent;
+
+ this.caseSensitiveChip.addEventListener("igcSelect", (evt) => {
+ this.treeGrid.findNext(this.searchBox.value, evt.detail, this.exactMatchChip.selected);
+ });
+ this.exactMatchChip.addEventListener("igcSelect", (evt) => {
+ this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, evt.detail);
+ });
+}
+```
+
+
@@ -487,10 +775,10 @@ function updateSearch() {
}
-Case Sensitive
+ Case Sensitive
-Exact Match
+ Exact Match
```
@@ -530,6 +818,7 @@ import { defineComponents, IgcInputComponent, IgcChipComponent, IgcIconComponent
defineComponents(IgcInputComponent, IgcChipComponent, IgcIconComponent, IgcIconButtonComponent);
```
+
```tsx
import { IgrGridModule } from "igniteui-react-grids";
import { IgrChipModule } from "igniteui-react";
@@ -537,6 +826,17 @@ import { IgrChipModule } from "igniteui-react";
const mods: any[] = [IgrGridModule, IgrChipModule];
mods.forEach((m) => m.register());
```
+
+
+
+```tsx
+import { IgrTreeGridModule } from "igniteui-react-grids";
+import { IgrChipModule, IgrIconButtonModule, IgrInputModule } from "igniteui-react";
+
+const mods: any[] = [IgrTreeGridModule, IgrChipModule, IgrIconButtonModule, IgrInputModule];
+mods.forEach((m) => m.register());
+```
+
@@ -544,6 +844,7 @@ To do this, let's go and grab the `Input`, `Icon`, `IconButton` and the `Chip` m
+
```razor
// eg. Program.cs register the following:
builder.Services.AddIgniteUIBlazor(
@@ -552,13 +853,27 @@ builder.Services.AddIgniteUIBlazor(
typeof(IgbIconButtonModule),
typeof(IgbIconModule)
);
-
+```
+
+
+```razor
+// eg. Program.cs register the following:
+builder.Services.AddIgniteUIBlazor(
+ typeof(IgbTreeGridModule),
+ typeof(IgbInputModule),
+ typeof(IgbIconButtonModule),
+ typeof(IgbIconModule)
+);
+```
+
+```razor
@code {
private IgbIcon searchIconRef { get; set; }
const string searchIcon = "";
const string prevIcon = "";
const string nextIcon = "";
const string clearIcon = "";
+
protected override void OnAfterRender(bool firstRender)
{
if (this.searchIconRef != null && firstRender)
@@ -571,7 +886,7 @@ builder.Services.AddIgniteUIBlazor(
this.searchIconRef.RegisterIconFromTextAsync("clear", clearIcon, "material");
}));
}
-
+ }
}
```
@@ -599,6 +914,16 @@ We will wrap all of our components inside an [InputGroup](../input-group.md). On
```
+
+```typescript
+public clearSearch() {
+ this.searchText = '';
+ this.@@igObjectRef.clearSearch();
+}
+```
+
+
+
```html
@@ -613,15 +938,6 @@ We will wrap all of our components inside an [InputGroup](../input-group.md). On
```
-
-```typescript
-public clearSearch() {
- this.searchText = '';
- this.@@igObjectRef.clearSearch();
-}
-```
-
-
```typescript
constructor() {
@@ -636,75 +952,140 @@ constructor() {
```
+```tsx
+const prevIconText =
+ "";
+const nextIconText =
+ "";
+const clearIconText =
+ "";
+
+useEffect(() => {
+ if (clearIconRef?.current) {
+ clearIconRef.current.registerIconFromText("clear", clearIconText, "material");
+ }
+ if (iconButtonPrevRef?.current) {
+ iconButtonPrevRef.current.registerIconFromText("prev", prevIconText, "material");
+ }
+ if (iconButtonNextRef?.current) {
+ iconButtonNextRef.current.registerIconFromText("next", nextIconText, "material");
+ }
+}, []);
+
+
+
+
+
+
+
+
+ Case Sensitive
+
+
+ Exact Match
+
+
+
+
+
+
+
+
+
+```
+
We will wrap all of our components inside an `Input`. On the left we will toggle between a search and a delete/clear icon (depending on whether the search input is empty or not). In the center, we will position the input itself. In addition, whenever the delete icon is clicked, we will update our `SearchText` and invoke the `{ComponentName}`'s `ClearSearch` method to clear the highlights.
+
-```razor
-
- @if (searchText.Length == 0)
- {
-
- }
- @if (searchText.Length > 0)
- {
-
- }
+
-
-
- Case Sensitive
-
-
- Exact Match
-
+We will wrap all of our components inside an `Input`. On the left we will toggle between a search and a delete/clear icon (depending on whether the search input is empty or not). In the center, we will position the input itself. In addition, whenever the delete icon is clicked, we will update our `SearchText` and invoke the `{ComponentName}`'s `ClearSearch` method to clear the highlights.
+
+```html
+
+
+
+
+
+@code {
+
+ public void clearSearch()
+ {
+ this.searchText = "";
+ this.grid.ClearSearchAsync();
+ }
+}
+```
On the right in our input group, let's create three separate containers with the following purposes:
@@ -792,6 +1213,7 @@ public showResults() {
-
- Case Sensitive
+
+ Case Sensitive
-
- Exact Match
+
+ Exact Match
+
+function handleCaseSensitiveChange(chip: IgrChip, event: IgrComponentBoolValueChangedEventArgs) {
+ gridRef.current.findNext(searchText, event.detail, exactMatchChipRef.current.selected);
+}
+function handleExactMatchChange(chip: IgrChip, event: IgrComponentBoolValueChangedEventArgs) {
+ gridRef.current.findNext(searchText, caseSensitiveChipRef.current.selected, event.detail);
+}
```
```razor
@@ -876,7 +1322,10 @@ constructor() {
nextIconButton.addEventListener("click", this.nextSearch);
prevIconButton.addEventListener("click", this.prevSearch);
}
+```
+
+```ts
public nextSearch() {
const grid = document.getElementById('grid') as IgcGridComponent;
const caseSensitiveChip = document.getElementById('caseSensitiveChip') as IgcChipComponent;
@@ -891,6 +1340,20 @@ public prevSearch() {
grid.findPrev(input.value, caseSensitiveChip.selected, exactMatchChip.selected);
}
```
+
+
+
+```ts
+public prevSearch() {
+ this.treeGrid.findPrev(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+}
+
+public nextSearch() {
+ this.treeGrid.findNext(this.searchBox.value, this.caseSensitiveChip.selected, this.exactMatchChip.selected);
+}
+```
+
+
```tsx
@@ -977,7 +1440,6 @@ Additional components with relative APIs that were used:
## Additional Resources
-
* [Virtualization and Performance](virtualization.md)
* [Filtering](filtering.md)
* [Paging](paging.md)
@@ -987,7 +1449,6 @@ Additional components with relative APIs that were used:
* [Column Pinning](column-pinning.md)
* [Column Resizing](column-resizing.md)
* [Selection](selection.md)
-
Our community is active and always welcoming to new ideas.
diff --git a/doc/en/components/grids/_shared/summaries.md b/doc/en/components/grids/_shared/summaries.md
index c2597e482..bb9dbb9b9 100644
--- a/doc/en/components/grids/_shared/summaries.md
+++ b/doc/en/components/grids/_shared/summaries.md
@@ -42,6 +42,7 @@ All available column data types could be found in the official [Column types top
`{ComponentName}` summaries are enabled per-column by setting `HasSummary` property to **true**. It is also important to keep in mind that the summaries for each column are resolved according to the column data type. In the `{ComponentName}` the default column data type is `string`, so if you want `number` or `date` specific summaries you should specify the `DataType` property as `number` or `date`. Note that the summary values will be displayed localized, according to the grid `Locale` and column `PipeArgs`.
+
```html
<{ComponentSelector} #grid1 [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)">
@@ -87,9 +88,76 @@ All available column data types could be found in the official [Column types top
{ComponentSelector}>
```
+
+
+
+
+```html
+<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)">
+
+
+
+
+
+
+{ComponentSelector}>
+```
+
+
+```razor
+<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID">
+
+
+
+
+
+
+
+
+
+
+
+{ComponentSelector}>
+```
+
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+```tsx
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
The other way to enable/disable summaries for a specific column or a list of columns is to use the public method `EnableSummaries`/`DisableSummaries` of the `{ComponentName}`.
+
```html
<{ComponentSelector} #grid [data]="data" [autoGenerate]="false" height="800px" width="800px" (columnInit)="initColumn($event)" >
@@ -185,6 +253,101 @@ function disableSummary() {
```
+
+
+
+
+```html
+<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px">
+
+
+
+
+
+{ComponentSelector}>
+
+
+```
+
+
+
+```html
+
+
+
+
+
+
+
+
+
+```
+```ts
+constructor() {
+ var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName};
+ var enableBtn = this.enableBtn = document.getElementById('enableBtn') as HTMLButtonElement;
+ var disableBtn = this.disableBtn = document.getElementById('disableBtn') as HTMLButtonElement;
+ hierarchicalGrid.data = this.data;
+ enableBtn.addEventListener("click", this.enableSummary);
+ disableBtn.addEventListener("click", this.disableSummary);
+}
+```
+
+
+
+```typescript
+public enableSummary() {
+ this.hierarchicalGrid.enableSummaries([
+ {fieldName: 'GrammyNominations'},
+ {fieldName: 'GrammyAwards'}
+ ]);
+}
+public disableSummary() {
+ this.hierarchicalGrid.disableSummaries(['GrammyNominations']);
+}
+```
+
+
+```razor
+<{ComponentSelector} AutoGenerate="false" Data="SingersData" Name="hierarchicalGrid" @ref="hierarchicalGrid" Id="hierarchicalGrid" PrimaryKey="ID">
+
+
+
+
+
+{ComponentSelector}>
+
+@code {
+ public async void DisableSummaries()
+ {
+ object[] disabledSummaries = { "GrammyNominations" };
+ await this.hierarchicalGrid.DisableSummariesAsync(disabledSummaries);
+ }
+}
+```
+
+```tsx
+function enableSummary() {
+ hierarchicalGridRef.current.enableSummaries([
+ {fieldName: 'GrammyNominations'},
+ {fieldName: 'GrammyAwards'}
+ ]);
+}
+function disableSummary() {
+ hierarchicalGridRef.current.disableSummaries(['GrammyNominations']);
+}
+
+
+
+
+
+
+
+
+
+
+```
+
## Custom {ComponentTitle} Summaries
@@ -298,7 +461,7 @@ See [Custom summaries, which access all data](#custom-summaries-which-access-all
> [!Note]
> In order to calculate the summary row height properly, the {ComponentTitle} needs the `Operate` method to always return an array of `SummaryResult` with the proper length even when the data is empty.
-
+
And now let's add our custom summary to the column `UnitsInStock`. We will achieve that by setting the Summaries` property to the class we create below.
```html
@@ -361,6 +524,67 @@ igRegisterScript("WebGridCustomSummary", (event) => {
}
}, false);
```
+
+
+
+And now let's add our custom summary to the column `GrammyAwards`. We will achieve that by setting the Summaries` property to the class we create below.
+
+```html
+<{ComponentSelector} #hierarchicalGrid [data]="data" [autoGenerate]="false" height="800px" width="800px">
+
+
+
+
+
+{ComponentSelector}>
+```
+
+
+
+```html
+
+
+
+
+
+
+
+```
+```ts
+constructor() {
+ var hierarchicalGrid = this.hierarchicalGrid = document.getElementById('hierarchicalGrid') as {ComponentName};
+ var grammyAwards = this.grammyAwards = document.getElementById('grammyAwards') as IgcColumnComponent;
+ hierarchicalGrid.data = this.data;
+ grammyAwards.summaries = this.mySummary;
+}
+```
+
+
+```typescript
+export class HierarchicalGridComponent implements OnInit {
+ mySummary = MySummary;
+}
+```
+
+```razor
+<{ComponentSelector}
+ AutoGenerate="true"
+ Name="hierarchicalGrid"
+ @ref="hierarchicalGrid"
+ Data="SingersData"
+ PrimaryKey="ID"
+ ColumnInitScript="WebHierarchicalGridCustomSummary">
+{ComponentSelector}>
+
+// In Javascript
+igRegisterScript("WebHierarchicalGridCustomSummary", (event) => {
+ if (event.detail.field === "GrammyAwards") {
+ event.detail.summaries = WebHierarchicalGridSummary;
+ }
+}, false);
+```
+
+
### Custom summaries, which access all data
Now you can access all {ComponentTitle} data inside the custom column summary. Two additional optional parameters are introduced in the SummaryOperand `Operate` method.
@@ -409,6 +633,7 @@ class WebGridDiscontinuedSummary {
}
```
+
`sample="/{ComponentSample}/data-summaries-custom", height="650", alt="{Platform} {ComponentTitle} data summary custom"`
@@ -420,6 +645,11 @@ class WebGridDiscontinuedSummary {
`sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} data summary options"`
+
+
+
+`sample="/{ComponentSample}/data-summary-options", height="650", alt="{Platform} {ComponentTitle} data summary options"`
+
@@ -488,14 +718,8 @@ When a default summary is defined, the height of the summary area is calculated
-
-
`sample="/{ComponentSample}/data-summary-template", height="650", alt="{Platform} {ComponentTitle} data summary template"`
-
-
-
-
## Formatting summaries
By default, summary results, produced by the built-in summary operands, are localized and formatted according to the grid `Locale` and column `PipeArgs`. When using custom operands, the `Locale` and `PipeArgs` are not applied. If you want to change the default appearance of the summary results, you may format them using the `SummaryFormatter` property.
@@ -536,20 +760,36 @@ constructor() {
}
```
-
-
```razor
-igRegisterScript("SummaryFormatter", (summary, summaryOperand) => {
- return summary.summaryResult + " rows";
-}, false);
+igRegisterScript("SummaryFormatter", (summary) => {
+ const result = summary.summaryResult;
+ if (summaryOperand instanceof IgcDateSummaryOperand && summary.key !== "count" && result !== null && result !== undefined) {
+ const format = new Intl.DateTimeFormat("en", { year: "numeric" });
+ return format.format(new Date(result));
+ }
+ return result;
+}, true);
```
-`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} data summary formatter"`
-
+```tsx
+public summaryFormatter(
+ summary: IgrSummaryResult,
+ summaryOperand: IgrSummaryOperand
+ ): string {
+ const result = summary.summaryResult;
+ if (summary.key !== "count" && result !== null && result !== undefined) {
+ const format = new Intl.DateTimeFormat("en", { year: "numeric" });
+ return format.format(new Date(result));
+ }
+ return result;
+ }
+
+
+```
-
+`sample="/{ComponentSample}/data-summary-formatter", height="650", alt="{Platform} {ComponentTitle} data summary formatter"`
@@ -630,6 +870,7 @@ The summary rows can be navigated with the following keyboard interactions:
In addition to the predefined themes, the grid could be further customized by setting some of the available [CSS properties](../theming.md).
In case you would like to change some of the colors, you need to set a class for the grid first:
+
```html
<{ComponentSelector} class="grid">{ComponentSelector}>
```
@@ -657,7 +898,37 @@ Then set the related CSS properties for that class:
### Demo
`sample="/{ComponentSample}/groupby-summary-styling", height="710", alt="{Platform} {ComponentTitle} groupby summary styling"`
+
+
+
+```html
+<{ComponentSelector} id="hierarchicalGrid">{ComponentSelector}>
+```
+
+```razor
+<{ComponentSelector} id="hierarchicalGrid">{ComponentSelector}>
+```
+
+```tsx
+<{ComponentSelector} id="hierarchicalGrid">
+{ComponentSelector}>
+```
+
+Then set the related CSS properties for that class:
+
+```css
+#hierarchicalGrid {
+ --ig-grid-summary-background-color:#e0f3ff;
+ --ig-grid-summary-focus-background-color: rgba( #94d1f7, .3 );
+ --ig-grid-summary-label-color: rgb(228, 27, 117);
+ --ig-grid-summary-result-color: black;
+}
+```
+
+### Demo
+`sample="/{ComponentSample}/data-summary-options-styling", height="710", alt="{Platform} {ComponentTitle} groupby summary styling"`
+
diff --git a/doc/en/components/grids/_shared/toolbar.md b/doc/en/components/grids/_shared/toolbar.md
index b34313e6d..6b046f285 100644
--- a/doc/en/components/grids/_shared/toolbar.md
+++ b/doc/en/components/grids/_shared/toolbar.md
@@ -18,11 +18,19 @@ The {ProductName} Toolbar in is a container for UI operations in the {Platform}
The toolbar and the predefined UI components support {Platform} events and expose API for developers.
-
+
## {Platform} Toolbar Grid Example
+`sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} Toolbar Example"`
+
+
+
+
+## {Platform} Toolbar Grid Example
`sample="/{ComponentSample}/toolbar-sample-1", height="420", alt="{Platform} {ComponentTitle} Toolbar Example"`
+
+
The predefined `Actions` and `Title` UI components are added inside the `GridToolbar` and this is all needed to have a toolbar providing default interactions with the corresponding Grid features:
@@ -59,7 +67,7 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo
- Grid Toolbar
+ Grid Toolbar
@@ -118,6 +126,7 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo
```
+
```html
@@ -132,6 +141,11 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo
```
+
+
+
+
+
```html
@@ -146,6 +160,45 @@ The predefined `Actions` and `Title` UI components are added inside the `GridToo
```
+
+
+
+
+```tsx
+
+
+
+ Hierarchical Grid Toolbar
+
+
+
+
+
+
+
+
+
+```
+
+
+
+
+
+```razor
+
+
+ Hierarchical Grid Toolbar
+
+
+
+
+
+
+
+
+```
+
+
> [!Note]
> As seen in the code snippet above, the predefined `Actions` UI components are wrapped in the `GridToolbarActions` container. This way, the toolbar title is aligned to the left of the toolbar and the actions are aligned to the right of the toolbar.
@@ -196,6 +249,7 @@ Of course, each of these UIs can be added independently of each other, or may no
```
+
```html
@@ -203,6 +257,11 @@ Of course, each of these UIs can be added independently of each other, or may no
```
+
+
+
+
+
```html
@@ -210,13 +269,37 @@ Of course, each of these UIs can be added independently of each other, or may no
```
+
-For a comprehensive look over each of the default UI components, continue reading the **Features** section below.
+
+
+```razor
+
+
+
+
+```
+
+
+
+```tsx
+
+
+
+
+```
+
+
+For a comprehensive look over each of the default UI components, continue reading the **Features** section below.
+
+
+
## Toolbar with Child Grids
+
Due to certain limitations in how the child grids of an IgxHierarchicalGrid are implemented and how DI scope works, there is a caveat when
using the toolbar in the scope of child grids. When defining a toolbar component inside the `igx-row-island` tags, always make sure to use the IgxGridToolbar and pass the provided grid instance as an input property to the toolbar itself.
This will make sure you always have the correct grid instance in the scope of your template:
@@ -236,8 +319,85 @@ This will make sure you always have the correct grid instance in the scope of yo
```
+
+
+
+Due to certain limitations in how the child grids of an `{ComponentSelector}` are implemented and how DI scope works, to define a toolbar component inside the `{RowIslandSelector}`, use the `ToolbarTemplate` input property. This allows child grids to create their own separate toolbar instances:
+
+
+
+
+
+```ts
+constructor() {
+ var rowIsland1 = document.getElementById('rowIsland1') as IgcRowIslandComponent;
+ rowIsland1.toolbarTemplate = this.rowIslandToolbarTemplate;
+}
+
+public rowIslandToolbarTemplate = () => {
+ return html`
+
+
+
+
+
+
+ `;
+}
+```
+
+```html
+
+ ...
+
+
+
+```
+
+```razor
+
+ ...
+
+
+
+
+//In JavaScript:
+igRegisterScript("RowIslandToolbarTemplate", () => {
+ var html = window.igTemplating.html;
+ return html`
+
+
+
+
+
+
+ `;
+}, false);
+```
+
+```tsx
+function rowIslandToolbarTemplate = () => {
+ return (
+
+
+
+
+
+
+
+
+ );
+}
+
+
+ ...
+
+
+
+```
+
## Features
@@ -249,8 +409,15 @@ These features can be enabled independently from each other by following a patte
Listed below are the main features of the toolbar with example code for each of them.
+
`sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} toolbar sample 2"`
+
+
+
+`sample="/{ComponentSample}/toolbar-sample-2", height="630", alt="{Platform} {ComponentTitle} toolbar sample 2"`
+
+
### Title
@@ -259,29 +426,47 @@ Setting a title for the toolbar in your grid is achieved by using the `GridToolb
Users can provide anything from simple text to more involved templates.
+
+
```html
Grid toolbar title
```
+
+
+
+
```html
Grid toolbar title
```
+
+
+
+
```tsx
- Grid toolbar title
+
+ Grid toolbar title
+
```
+
+
+
+
```razor
Grid toolbar title
```
+
+
### Actions
@@ -290,6 +475,8 @@ The `GridToolbarActions` is where users can place actions/interactions in relati
As with the title portion of the toolbar, users can provide anything inside that template part, including the default
toolbar interaction components.
+
+
```html
@@ -299,15 +486,11 @@ toolbar interaction components.
```
+
+
-```razor
-
-
-
-
-
-```
-
+
+
```html
@@ -315,15 +498,33 @@ toolbar interaction components.
```
+
+
+
+
+```razor
+
+
+
+
+
+```
+
+
+
+
+
```tsx
-
```
+
+
+
Each action now exposes a way to change the overlay settings of the actions dialog by using the `OverlaySettings` input. For example:
@@ -386,6 +587,8 @@ The `GridToolbarPinning` component provides the default UI for interacting with
The component is setup to work out of the box with the parent grid containing the toolbar as well as several input properties for customizing the UI, such as the component title, the placeholder for the component input and the height of the dropdown itself.
+
+
```html
@@ -398,15 +601,11 @@ The component is setup to work out of the box with the parent grid containing th
```
+
+
-```razor
-
-
-
-
-
-```
-
+
+
```html
@@ -418,7 +617,23 @@ The component is setup to work out of the box with the parent grid containing th
```
+
+
+
+
+
+```razor
+
+
+
+
+
+```
+
+
+
+
```tsx
@@ -426,12 +641,16 @@ The component is setup to work out of the box with the parent grid containing th
```
+
+
### Column Hiding
The `GridToolbarHiding` provides the default UI for interacting with column hiding. Exposes the same input properties for customizing the UI, such as the component
title, the placeholder for the component input and the height of the dropdown itself.
+
+
```html
@@ -444,15 +663,11 @@ title, the placeholder for the component input and the height of the dropdown it
```
+
+
-```razor
-
-
-
-
-
-```
-
+
+
```html
@@ -464,7 +679,23 @@ title, the placeholder for the component input and the height of the dropdown it
```
+
+
+
+
+
+```razor
+
+
+
+
+
+```
+
+
+
+
```tsx
@@ -472,11 +703,15 @@ title, the placeholder for the component input and the height of the dropdown it
```
+
+
### Advanced Filtering
Toolbar Advanced Filtering component provides the default UI for the Advanced Filtering feature. The component exposes a way to change the default text of the button.
+
+
```html
@@ -484,15 +719,11 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi
```
+
+
-```razor
-
-
-
-
-
-```
-
+
+
```html
@@ -500,7 +731,23 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi
```
+
+
+
+
+```razor
+
+
+
+
+
+```
+
+
+
+
+
```tsx
@@ -508,6 +755,8 @@ Toolbar Advanced Filtering component provides the default UI for the Advanced Fi
```
+
+
### Data Exporting
@@ -550,6 +799,8 @@ These range from changing the display text, to enabling/disabling options in the
Here is a snippet showing some of the options which can be customized through the {Platform} template:
+
+
```html
@@ -566,15 +817,11 @@ Here is a snippet showing some of the options which can be customized through th
```
+
+
-```razor
-
-
-
-
-
-```
-
+
+
```html
@@ -583,7 +830,23 @@ Here is a snippet showing some of the options which can be customized through th
```
+
+
+
+
+
+```razor
+
+
+
+
+
+```
+
+
+
+
```tsx
@@ -591,6 +854,8 @@ Here is a snippet showing some of the options which can be customized through th
```
+
+
In addition to changing the exported filename, the user can further configure the exporter options by waiting for the `ToolbarExporting` event and customizing the options entry in the event properties.
@@ -601,6 +866,8 @@ In addition to changing the exported filename, the user can further configure th
The following code snippet demonstrates subscribing to the toolbar exporting event and configuring the exporter options:
+
+
```html
<{ComponentSelector} (toolbarExporting)="configureExport($event)" >{ComponentSelector}>
@@ -691,6 +958,64 @@ igRegisterScript("WebGridToolbarExporting", (evt) => {
});
}, false);
```
+
+
+
+
+
+
+```html
+<{ComponentSelector} id="hierarchicalGrid">{ComponentSelector}>
+```
+```ts
+constructor() {
+ var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent;
+ hierarchicalGrid.addEventListener("toolbarExporting", this.configureExport);
+}
+
+public configureExport(evt: CustomEvent) {
+ const args = evt.detail;
+ const options: IgcExporterOptionsBase = args.options;
+ if (options) {
+ options.fileName = `Report_${new Date().toDateString()}`;
+ (args.exporter as any).columnExporting.subscribe((columnArgs: any) => {
+ columnArgs.cancel = columnArgs.header === 'Photo';
+ });
+ }
+}
+```
+
+
+```tsx
+function configureExport(evt: IgrGridToolbarExportEventArgs) {
+ const args = evt.detail;
+ const options: IgrExporterOptionsBase = args.options;
+
+ options.fileName = `Report_${new Date().toDateString()}`;
+ (args.exporter as any).columnExporting.subscribe((columnArgs: any) => {
+ columnArgs.cancel = columnArgs.header === 'Photo';
+ });
+}
+
+<{ComponentSelector} toolbarExporting={configureExport}>
+{ComponentSelector}>
+```
+
+```razor
+<{ComponentSelector} ToolbarExportingScript="ConfigureExport">{ComponentSelector}>
+
+// In Javascript
+igRegisterScript("ConfigureExport", (evt) => {
+ const args = evt.detail;
+ const options = args.options;
+ options.fileName = `Report_${new Date().toDateString()}`;
+ args.exporter.columnExporting.subscribe((columnArgs) => {
+ columnArgs.cancel = columnArgs.header === 'Photo';
+ });
+}, false);
+```
+
+
The following sample demonstrates how to customize the exported files:
@@ -698,7 +1023,6 @@ The following sample demonstrates how to customize the exported files:
-
## Exporting Indicator
@@ -713,17 +1037,22 @@ The sample belows uses has significant amount of data, in order to increase the
`sample="/{ComponentSample}/data-exporting-indicator", height="370", alt="{Platform} {ComponentTitle} data exporting indicator"`
-
+
## Custom Content
+
+
> [!Note]
> This replaces the old toolbar template directive. If you are migrating from a version before v11 our migrations will handle the moving of the template content. However, we do not handle the bindings in the template, so make sure to double check the modified template files after the migration completes.
+
+
If the actions part of the toolbar component is not sufficient for a particular use case, the toolbar itself has a general content projection where users can provide additional UI. If the user needs the respective grid instance for API calls or bindings, they can create a template reference variable.
Here is a sample snippet:
+
```html
<{ComponentSelector} #gridRef>
@@ -742,9 +1071,11 @@ Here is a sample snippet:
{ComponentSelector}>
```
+
+
```html
<{ComponentSelector} id="grid">
@@ -758,13 +1089,52 @@ Here is a sample snippet:
{ComponentSelector}>
```
+
+
+
+```tsx
+<{ComponentSelector}>
+
+
+ title
+
+ {/*
+ Everything between the toolbar tags except the default toolbar components
+ will be projected as custom content.
+ */}
+
+
+
+{ComponentSelector}>
+```
+
+
+
+
+
+```razor
+<{ComponentSelector}>
+
+ title
+ @*
+ Everything between the toolbar tags except the default toolbar components
+ will be projected as custom content.
+ *@
+
+
+
+{ComponentSelector}>
+```
+
+
+
The following sample demonstrates how to add an additional button to the toolbar to clear the sorting set by clicking on the columns' headers:
`sample="/{ComponentSample}/toolbar-sample-4", height="420", alt="{Platform} {ComponentTitle} toolbar sample 4"`
-
+
@@ -920,6 +1290,15 @@ The last step is to **include** the newly created themes.
+
+
+## Known Limitations
+
+> [!Note]
+> Currently, defining a toolbar component inside the {RowIslandSelector} is not supported.
+
+
+
## API References
The Grid Toolbar service has a few more APIs to explore, which are listed below.
diff --git a/doc/en/components/grids/_shared/virtualization.md b/doc/en/components/grids/_shared/virtualization.md
index 989f3d1cc..0bc8ae18f 100644
--- a/doc/en/components/grids/_shared/virtualization.md
+++ b/doc/en/components/grids/_shared/virtualization.md
@@ -12,11 +12,13 @@ namespace: Infragistics.Controls
In {ProductName}, the `{ComponentName}` control virtualizes its content both vertically and horizontally.
+
+
## {Platform} {ComponentTitle} Virtualization and Performance Example
`sample="/{ComponentSample}/data-performance-virtualization", height="550", alt="{Platform} {ComponentTitle} Virtualization and Performance Example"`
-
+
## Enabling Virtualization
@@ -58,7 +60,6 @@ Without information about the sizes of the container and the items before render
## Additional Resources
-
* [Paging](paging.md)
* [Filtering](filtering.md)
* [Sorting](sorting.md)
@@ -67,7 +68,6 @@ Without information about the sizes of the container and the items before render
* [Column Pinning](column-pinning.md)
* [Column Resizing](column-resizing.md)
* [Selection](selection.md)
-
Our community is active and always welcoming to new ideas.
diff --git a/doc/en/components/grids/data-grid.md b/doc/en/components/grids/data-grid.md
index b31cd760b..6867821c3 100644
--- a/doc/en/components/grids/data-grid.md
+++ b/doc/en/components/grids/data-grid.md
@@ -60,7 +60,7 @@ namespace: Infragistics.Controls
In this {ProductName} Grid example, you can see how users can do both basic and excel-style filtering, live-data sorting, and use grid summaries as well as cell templating. The demo also includes paging set to display 10 items per page.
-`sample="/{GridSample}/overview", height="700", alt="{Platform} grid example"`
+`sample="/{GridSample}/overview", img-src="https://static.infragistics.com/marketing/Website/products/ignite-ui-blazor/ignite-ui-blazor-client-grid", height="700", alt="{Platform} grid example"`
@@ -70,7 +70,7 @@ In this {ProductName} Grid example, you can see how users can do both basic and
### Dependencies
-To get started with the {Platform} Data Grid, first you need to install the {ProductName} package.
+To get started with the {Platform} Data Grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages.
@@ -92,15 +92,20 @@ Afterwards, you may start implementing the control by adding the following names
```
-
-When installing the {Platform} grid package, the core, inputs and layout packages must also be installed.
+
+```cmd
+npm install --save {PackageGrids}
+```
+
+
```cmd
-npm install --save {PackageCore}
+npm install --save {PackageCommon}
npm install --save {PackageGrids}
-npm install --save {PackageInputs}
-npm install --save {PackageLayouts}
```
+
+
+
You also need to include the following import to use the grid:
diff --git a/doc/en/components/grids/hierarchical-grid/load-on-demand.md b/doc/en/components/grids/hierarchical-grid/load-on-demand.md
index f9f749745..2de0d97ca 100644
--- a/doc/en/components/grids/hierarchical-grid/load-on-demand.md
+++ b/doc/en/components/grids/hierarchical-grid/load-on-demand.md
@@ -10,7 +10,7 @@ namespace: Infragistics.Controls
The Ignite UI for {Platform} `HierarchicalGrid` allows fast rendering by requesting the minimum amount of data to be retrieved from the server so that the user can see the result in view and interact with the visible data as quickly as possible. Initially only the root grid’s data is retrieved and rendered, only after the user expands a row containing a child grid, he will receive the data for that particular child grid. This mechanism, also known as Load on Demand, can be easily configured to work with any remote data.
-This topic demonstrates how to configure Load on Demand by creating a Remote Service Provider that communicates with an already available remote oData v4 Service. Here's the working demo and later we will go through it step by step and describe the process of creating it.
+This topic demonstrates how to configure Load on Demand by creating a Remote Service Provider that communicates with an already available remote service. Here's the working demo and later we will go through it step by step and describe the process of creating it.
## {Platform} Hierarchical Grid Load On Demand Example
@@ -28,26 +28,25 @@ We will be communicating with our backend service over HTTP protocol using the X
```typescript
public getData(dataState): Observable {
return this.http.get(this.buildUrl(dataState)).pipe(
- map(response => response['value']),
+ map(response => response),
);
}
```
-As you can see `this.http` will be a reference to our `HttpCLient` module, and `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return an Observable, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
+As you can see `this.http` will be a reference to our `HttpCLient` module, and `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response and return an Observable, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
We will be communicating with our backend service over HTTP protocol using the [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) global function the browsers provide. That way in order to get our data we will need this simple method in our service:
```ts
-function getData(dataState) {
+export function getData(dataState: any): any {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data['value']);
+ .then((result) => result.json());
}
```
-As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
+As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
@@ -56,17 +55,16 @@ We will be communicating with our backend service over HTTP protocol using the [
```razor
function getData(dataState) {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data['value']);
+ .then((result) => result.json());
}
```
-As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We map our response so we get only the value of our result and return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
+As you can see `buildUrl()` will be the method that will generate our url based on the data that we have received. We return a Promise, since this is executed asynchronously. That way we can later subscribe to it, process it further in our application and pass it to our grid.
#### Building our request url
-Next we will define how we should build our URL for the GET request. This is where we will be able to get the data for our main grid but also for any child grid inside it. We will use the `Customers` data from [here](https://services.odata.org/V4/Northwind/Northwind.svc/) for our root level and use `Order` and `Order_Details` for the lower levels. The model will differ per application but we will use the following one:
+Next we will define how we should build our URL for the GET request. This is where we will be able to get the data for our main grid but also for any child grid inside it. We will use the `Customers` data from [here](https://data-northwind.indigo.design/swagger/index.html) for our root level and use `Orders` and `Details` for the lower levels. The model will differ per application but we will use the following one:
@@ -87,14 +85,10 @@ export interface IDataState {
public buildUrl(dataState: IDataState): string {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${this.url}${qS}`;
@@ -119,14 +113,10 @@ const dataState: {
function buildUrl(dataState: any) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${URL}${qS}`;
@@ -150,17 +140,13 @@ const dataState: {
function buildUrl(dataState) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
- return `${URL}${qS}`;
+ return `${DATA_URL}${qS}`;
}
```
@@ -185,27 +171,23 @@ export interface IDataState {
@Injectable()
export class RemoteLoDService {
- url = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
+ public url = `https://data-northwind.indigo.design/`;
constructor(private http: HttpClient) { }
public getData(dataState: IDataState): Observable {
return this.http.get(this.buildUrl(dataState)).pipe(
- map((response) => response['value'])
+ map((response) => response)
);
}
public buildUrl(dataState: IDataState): string {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${this.url}${qS}`;
@@ -218,25 +200,20 @@ export class RemoteLoDService {
Finally, this is how our remote service would look like:
```ts
-const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
+const URL = `https://data-northwind.indigo.design/`;
-export function getData(dataState?: any): any {
+export function getData(dataState: any): any {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data["value"]);
+ .then((result) => result.json());
}
function buildUrl(dataState: any) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${URL}${qS}`;
@@ -248,28 +225,23 @@ function buildUrl(dataState: any) {
Finally, this is how our remote service would look like:
```razor
-const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
+const DATA_URL = `https://data-northwind.indigo.design/`;
-function getData(dataState): any {
+function getData(dataState) {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data["value"]);
+ .then((result) => result.json());
}
function buildUrl(dataState) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
- return `${URL}${qS}`;
+ return `${DATA_URL}${qS}`;
}
```
@@ -280,28 +252,28 @@ Next we will setup our hierarchical grid and connect it to our remote service pr
#### Template defining
-First we will define our hierarchical grid template with the levels of hierarchy that we expect to have. We know that our root grid `PrimaryKey` for the customers is their `CustomerID`, for their orders on the first level - `OrderID` and respectively for order details - `ProductID`. Knowing each database table and their keys allows us to define our initial template:
+First we will define our hierarchical grid template with the levels of hierarchy that we expect to have. We know that our root grid `PrimaryKey` for the customers is their `customerId`, for their orders on the first level - `orderId` and respectively for order details - `productId`. Knowing each database table and their keys allows us to define our initial template:
```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -310,25 +282,25 @@ First we will define our hierarchical grid template with the levels of hierarchy
```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
```
@@ -336,25 +308,25 @@ First we will define our hierarchical grid template with the levels of hierarchy
```tsx
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
```
@@ -362,24 +334,24 @@ First we will define our hierarchical grid template with the levels of hierarchy
```razor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -432,24 +404,24 @@ The template file, with these changes added, would look like this:
```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -458,25 +430,25 @@ The template file, with these changes added, would look like this:
```html
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
```
@@ -486,11 +458,11 @@ constructor() {
const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland");
ordersRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "CustomerID");
+ this.gridCreated(event, "Customers");
});
orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "OrderID");
+ this.gridCreated(event, "Orders");
});
}
```
@@ -498,38 +470,38 @@ constructor() {
```tsx
-
-
-
-
-
-
-
+
+
+
+
+
+
+ gridCreated(rowIsland, e, "CustomerID")}
+ childDataKey="Orders"
+ primaryKey="orderId"
+ gridCreated={(
+ rowIsland: IgrRowIsland,
+ e: IgrGridCreatedEventArgs
+ ) => gridCreated(rowIsland, e, "Customers")}
>
-
-
-
-
-
+
+
+
+
+ gridCreated(rowIsland, e, "OrderID")}
+ childDataKey="Details"
+ primaryKey="productId"
+ gridCreated={(
+ rowIsland: IgrRowIsland,
+ e: IgrGridCreatedEventArgs
+ ) => gridCreated(rowIsland, e, "Orders")}
>
-
-
-
-
+
+
+
+
@@ -538,24 +510,24 @@ constructor() {
```razor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -719,7 +691,7 @@ function gridCreated(rowIsland: IgrRowIsland, event: IgrGridCreatedEventArgs, _p
```razor
igRegisterScript("OnGridCreated", (args) => {
const context = args.detail;
- const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID";
+ const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders";
const dataState = {
key: context.owner.childDataKey,
parentID: context.parentID,
@@ -802,11 +774,11 @@ constructor() {
const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland");
ordersRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "CustomerID");
+ this.gridCreated(event, "Customers");
});
orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "OrderID");
+ this.gridCreated(event, "Orders");
});
hierarchicalGrid.isLoading = true;
@@ -891,7 +863,7 @@ igRegisterScript("OnGridRendered", () => {
igRegisterScript("OnGridCreated", (args) => {
const context = args.detail;
- const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID";
+ const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders";
const dataState = {
key: context.owner.childDataKey,
parentID: context.parentID,
diff --git a/doc/en/components/grids/hierarchical-grid/overview.md b/doc/en/components/grids/hierarchical-grid/overview.md
index 6bc5b02c1..e7c8f8a84 100644
--- a/doc/en/components/grids/hierarchical-grid/overview.md
+++ b/doc/en/components/grids/hierarchical-grid/overview.md
@@ -20,7 +20,7 @@ In this {Platform} grid example you can see how users can visualize hierarchical
### Dependencies
-To get started with the {Platform} hierarchical grid, first you need to install the {ProductName} package.
+To get started with the {Platform} hierarchical grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages.
@@ -43,16 +43,20 @@ Afterwards, you may start implementing the control by adding the following names
-
-
-When installing the {Platform} hierarchical grid package, the core package must also be installed.
+
+```cmd
+npm install --save {PackageGrids}
+```
+
+
```cmd
-npm install --save {PackageCore}
+npm install --save {PackageCommon}
npm install --save {PackageGrids}
-npm install --save {PackageInputs}
-npm install --save {PackageLayouts}
```
+
+
+
You also need to include the following import to use the grid:
@@ -252,9 +256,9 @@ Most applications are designed to load as little data as possible initially, whi
```html
-
-
-
+
+
+
@@ -303,27 +307,23 @@ export class HierarchicalGridLoDSampleComponent implements AfterViewInit {
@Injectable()
export class RemoteLoDService {
- public url = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
+ public url = `https://data-northwind.indigo.design/`;
constructor(private http: HttpClient) { }
- public getData(dataState?: any): Observable {
+ public getData(dataState: any): Observable {
return this.http.get(this.buildUrl(dataState)).pipe(
- map((response) => response["value"])
+ map((response) => response)
);
}
public buildUrl(dataState) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${this.url}${qS}`;
@@ -334,9 +334,9 @@ export class RemoteLoDService {
```html
-
-
-
+
+
+
```
@@ -349,13 +349,16 @@ export class HierarchicalGridLoadOnDemand {
const hierarchicalGrid = document.getElementById("hGrid") as IgcHierarchicalGridComponent;
const ordersRowIsland = document.getElementById("ordersRowIsland");
const orderDetailsRowIsland = document.getElementById("orderDetailsRowIsland");
+
ordersRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "CustomerID");
+ this.gridCreated(event, "Customers");
});
orderDetailsRowIsland.addEventListener("gridCreated", (event: any) => {
- this.gridCreated(event, "OrderID");
+ this.gridCreated(event, "Orders");
});
+
hierarchicalGrid.isLoading = true;
+
getData({ parentID: null, rootLevel: true, key: "Customers" }).then((data: any) => {
hierarchicalGrid.isLoading = false;
hierarchicalGrid.data = data;
@@ -386,7 +389,8 @@ export class HierarchicalGridLoadOnDemand {
import { getData } from "./remoteService";
export default function Sample() {
- const hierarchicalGrid = useRef(null);
+ const hierarchicalGrid = useRef(null);
+
function gridCreated(
rowIsland: IgrRowIsland,
event: IgrGridCreatedEventArgs,
@@ -406,6 +410,7 @@ export default function Sample() {
context.grid.markForCheck();
});
}
+
useEffect(() => {
hierarchicalGrid.current.isLoading = true;
getData({ parentID: null, rootLevel: true, key: "Customers" }).then(
@@ -420,28 +425,28 @@ export default function Sample() {
return (
gridCreated(rowIsland, e, "CustomerID")}
+ ) => gridCreated(rowIsland, e, "Customers")}
>
gridCreated(rowIsland, e, "OrderID")}
+ ) => gridCreated(rowIsland, e, "Orders")}
>
@@ -451,24 +456,20 @@ export default function Sample() {
```ts
-const URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
-export function getData(dataState?: any): any {
+const URL = `https://data-northwind.indigo.design/`;
+
+export function getData(dataState: any): any {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data["value"]);
+ .then((result) => result.json());
}
function buildUrl(dataState: any) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${URL}${qS}`;
@@ -477,10 +478,10 @@ function buildUrl(dataState: any) {
```razor
-
-
-
+
+
@@ -498,7 +499,7 @@ igRegisterScript("OnGridRendered", () => {
igRegisterScript("OnGridCreated", (args) => {
const context = args.detail;
- const _parentKey = context.owner.childDataKey === "Orders" ? "CustomerID" : "OrderID";
+ const _parentKey = context.owner.childDataKey === "Orders" ? "Customers" : "Orders";
const dataState = {
key: context.owner.childDataKey,
parentID: context.parentID,
@@ -513,24 +514,20 @@ igRegisterScript("OnGridCreated", (args) => {
});
}, false)
-const DATA_URL = `https://services.odata.org/V4/Northwind/Northwind.svc/`;
+const DATA_URL = `https://data-northwind.indigo.design/`;
+
function getData(dataState) {
return fetch(buildUrl(dataState))
- .then((result) => result.json())
- .then((data) => data["value"]);
+ .then((result) => result.json());
}
function buildUrl(dataState) {
let qS = "";
if (dataState) {
- qS += `${dataState.key}?`;
-
- if (!dataState.rootLevel) {
- if (typeof dataState.parentID === "string") {
- qS += `$filter=${dataState.parentKey} eq '${dataState.parentID}'`;
- } else {
- qS += `$filter=${dataState.parentKey} eq ${dataState.parentID}`;
- }
+ if (dataState.rootLevel) {
+ qS += `${dataState.key}`;
+ } else {
+ qS += `${dataState.parentKey}/${dataState.parentID}/${dataState.key}`;
}
}
return `${DATA_URL}${qS}`;
diff --git a/doc/en/components/grids/tree-grid/overview.md b/doc/en/components/grids/tree-grid/overview.md
index 6c82d4ae6..4a2c2bc31 100644
--- a/doc/en/components/grids/tree-grid/overview.md
+++ b/doc/en/components/grids/tree-grid/overview.md
@@ -23,7 +23,7 @@ In this example, you can see how users can manipulate hierarchical or flat data.
### Dependencies
-To get started with the {Platform} tree grid, first you need to install the {ProductName} package.
+To get started with the {Platform} tree grid, first you need to install the {PackageCommon} package.`{PackageGrids}` package.`{PackageCommon}` and `{PackageGrids}` packages.
@@ -48,13 +48,18 @@ Afterwards, you may start implementing the control by adding the following names
-When installing the {Platform} tree grid package, the core package must also be installed.
+
+```cmd
+npm install --save {PackageGrids}
+```
+
+
```cmd
-npm install --save {PackageCore}
+npm install --save {PackageCommon}
npm install --save {PackageGrids}
-npm install --save {PackageInputs}
```
+
diff --git a/doc/en/components/inputs/combo/features.md b/doc/en/components/inputs/combo/features.md
index 0569e39fc..c4cb5b94b 100644
--- a/doc/en/components/inputs/combo/features.md
+++ b/doc/en/components/inputs/combo/features.md
@@ -43,8 +43,38 @@ You will also need to link an additional CSS file to apply the styling to the `S
+
+
+```tsx
+import { IgrComboModule, IgrCombo, IgrSwitchModule, IgrSwitch } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+IgrComboModule.register();
+IgrSwitchModule.register();
+```
+
+
+
Then, we will add event handlers to all switch components so that we can control the combo features by toggling the switches:
+```tsx
+const comboRef = useRef(null);
+const switchCaseSensitiveRef = useRef(null);
+
+const disableFiltering = (switchComponent: IgrSwitch) => {
+ comboRef.current.disableFiltering =
+ switchCaseSensitiveRef.current.disabled = switchComponent.checked;
+};
+
+const showCaseSensitiveIcon = (switchComponent: IgrSwitch) => {
+ comboRef.current.caseSensitiveIcon = switchComponent.checked;
+};
+
+const disableCombo = (switchComponent: IgrSwitch) => {
+ comboRef.current.disabled = switchComponent.checked;
+};
+```
+
```ts
let combo = document.getElementById('combo') as IgcComboComponent;
@@ -126,6 +156,12 @@ switchGroup.addEventListener("igcChange", () => {
}
```
+```tsx
+const enableGrouping = (switchComponent: IgrSwitch) => {
+ comboRef.current.groupKey = switchComponent.checked ? "country" : undefined;
+};
+```
+
## Features
### Filtering
@@ -142,12 +178,17 @@ Filtering options can be further enhanced by enabling the search case sensitivit
```
+```tsx
+
+```
+
#### Filtering Options
The {ProductName} `ComboBox` component exposes one more filtering property that allows passing configuration of both `FilterKey` and `CaseSensitive` options. The `FilterKey` indicates which data source field should be used for filtering the list of options. The `CaseSensitive` option indicates if the filtering should be case-sensitive or not.
The following code snippet shows how to filter the cities from our data source by country instead of name. We are also making the filtering case-sensitive by default:
+
```ts
const options = {
filterKey: 'country',
@@ -156,6 +197,18 @@ const options = {
combo.filteringOptions = options;
```
+
+
+
+```tsx
+const options = {
+ filterKey: 'country',
+ caseSensitive: true
+};
+
+comboRef.current.filteringOptions = options;
+```
+
### Grouping
@@ -169,6 +222,10 @@ Defining a `GroupKey` option will group the items, according to the provided key
```
+```tsx
+
+```
+
> [!Note]
> The `GroupKey` property will only have effect if your data source consists of complex objects.
@@ -184,6 +241,10 @@ The ComboBox component also exposes an option for setting whether groups should
```
+```tsx
+
+```
+
### Label
The `Combo` label can be set easily using the `Label` property:
@@ -196,6 +257,10 @@ The `Combo` label can be set easily using the `Label` property:
```
+```tsx
+
+```
+
### Placeholder
A placeholder text can be specified for both the ComboBox component input and the search input placed inside the dropdown menu:
@@ -208,6 +273,10 @@ A placeholder text can be specified for both the ComboBox component input and th
```
+```tsx
+
+```
+
### Autofocus
If you want your ComboBox to be automatically focused on page load you can use the following code:
@@ -220,6 +289,10 @@ If you want your ComboBox to be automatically focused on page load you can use t
```
+```tsx
+
+```
+
### Search Input Focus
The ComboBox search input is focused by default. To disable this feature and move the focus to the list of options use the `AutofocusList` property as shown below:
@@ -232,6 +305,10 @@ The ComboBox search input is focused by default. To disable this feature and mov
```
+```tsx
+
+```
+
### Required
The ComboBox can be marked as required by setting the required property.
@@ -244,6 +321,10 @@ The ComboBox can be marked as required by setting the required property.
```
+```tsx
+
+```
+
### Disable ComboBox
You can disable the ComboBox using the `Disabled` property:
@@ -256,6 +337,10 @@ You can disable the ComboBox using the `Disabled` property:
```
+```tsx
+
+```
+
## API Reference
diff --git a/doc/en/components/inputs/combo/overview.md b/doc/en/components/inputs/combo/overview.md
index eaceff02c..3a51aa942 100644
--- a/doc/en/components/inputs/combo/overview.md
+++ b/doc/en/components/inputs/combo/overview.md
@@ -58,6 +58,25 @@ You will also need to link an additional CSS file to apply the styling to the `C
```
+
+
+First, you need to the install the corresponding {ProductName} npm package by running the following command:
+
+```cmd
+npm install igniteui-react
+```
+
+You will then need to import the {Platform} `ComboBox`, its necessary CSS, and register its module, like so:
+
+```tsx
+import { IgrComboModule, IgrCombo } from 'igniteui-react';
+import 'igniteui-webcomponents/themes/light/bootstrap.css';
+
+IgrComboModule.register();
+```
+
+
+
>[!WARNING]
> The `Combo` component doesn't work with the standard `
-## 強調表示
+## ハイライト表示
-線、列、マーカーなどのビジュアルに、マウスをデータ項目の上に置いたときに強調表示して、フォーカスを合わせます。この機能は、すべてのチャート タイプで有効になっています。この機能の詳細については、[チャート強調表示](features/chart-highlighting.md)トピックを参照してください。
+線、列、マーカーなどのビジュアルに、マウスをデータ項目の上に置いたときにハイライト表示して、フォーカスを合わせます。この機能は、すべてのチャート タイプで有効になっています。この機能の詳細については、[チャートのハイライト表示](features/chart-highlighting.md)トピックを参照してください。
-`sample="/charts/category-chart/column-chart-with-highlighting", height="500", alt="{Platform} 強調表示の例"`
+`sample="/charts/category-chart/column-chart-with-highlighting", height="500", alt="{Platform} ハイライト表示の例"`
diff --git a/doc/jp/components/charts/chart-overview.md b/doc/jp/components/charts/chart-overview.md
index 172f4c279..488a2f4c2 100644
--- a/doc/jp/components/charts/chart-overview.md
+++ b/doc/jp/components/charts/chart-overview.md
@@ -52,7 +52,7 @@ _language: ja
{Platform} 棒チャート (棒グラフ) は、さまざまなカテゴリのデータの頻度、カウント、合計、または平均を、同じ幅と異なる長さの水平棒でエンコードされたデータとすばやく比較するために使用される最も一般的なカテゴリ チャート タイプの 1 つです。これらは、時間の経過に伴う項目の価値の変動、データ分布、ソートされたデータのランキング (高から低、最悪から最高) を表示するのに理想的です。データは、チャートの左から右にデータ ポイントの値に向かって伸びる長方形のコレクションを使用して表されます。[棒チャート](types/bar-chart.md)の詳細をご覧ください。
-`sample="/charts/data-chart/bar-chart-multiple-sources", height="600", alt="{Platform} 複数ソースの棒チャート"`
+`sample="/charts/data-chart/bar-chart-multiple-sources", img-src="https://static.infragistics.com/marketing/Website/products/Ignite-UI-for-Angular/ignite-ui-angular-bar-chart", height="600", alt="{Platform} 複数ソースの棒チャート"`
@@ -172,7 +172,7 @@ _language: ja
### {Platform} 散布図
-{Platform} 散布図は、デカルト (X、Y) 座標系を使用してデータをプロットすることにより、2 つの値間の関係を示すために使用されます。各データ ポイントは、X 軸と Y 軸上のデータ値の交点として描画されます。散布図は、不均一な間隔またはデータのクラスターに注意を向けます。予測結果の収集データの標準偏差を強調表示し、科学データや統計データをプロットするためによく使用されます。{Platform} 散布図は、データがバインド前に時系列になっていない場合でも、X 軸と Y 軸でデータを時系列に整理してプロットします。[散布図](types/scatter-chart.md)の詳細をご覧ください。
+{Platform} 散布図は、デカルト (X、Y) 座標系を使用してデータをプロットすることにより、2 つの値間の関係を示すために使用されます。各データ ポイントは、X 軸と Y 軸上のデータ値の交点として描画されます。散布図は、不均一な間隔またはデータのクラスターに注意を向けます。予測結果の収集データの標準偏差をハイライト表示し、科学データや統計データをプロットするためによく使用されます。{Platform} 散布図は、データがバインド前に時系列になっていない場合でも、X 軸と Y 軸でデータを時系列に整理してプロットします。[散布図](types/scatter-chart.md)の詳細をご覧ください。
`sample="/charts/data-chart/scatter-point-chart", height="600", alt="{Platform} 散布マーカー チャート"`
@@ -274,7 +274,7 @@ alt="{Platform} チャート インタラクティブなパニングとズーム
### マーカー、ツールチップ、およびテンプレート
-10 個の[マーカー タイプ](features/chart-markers.md)のいずれかを使用するか、独自の[マーカー-テンプレート](features/chart-markers.md#{PlatformLower}-チャート-マーカーのテンプレート)を作成して、データを強調表示するか、シンプルな[ツールチップ](features/chart-tooltips.md)または[カスタム ツールチップ](features/chart-tooltips.md#{PlatformLower}-チャート-ツールチップ-テンプレート)を使用した多軸および複数系列のチャートで、データにコンテキストと意味を追加します。
+10 個の[マーカー タイプ](features/chart-markers.md)のいずれかを使用するか、独自の[マーカー-テンプレート](features/chart-markers.md#{PlatformLower}-チャート-マーカーのテンプレート)を作成して、データをハイライト表示するか、シンプルな[ツールチップ](features/chart-tooltips.md)または[カスタム ツールチップ](features/chart-tooltips.md#{PlatformLower}-チャート-ツールチップ-テンプレート)を使用した多軸および複数系列のチャートで、データにコンテキストと意味を追加します。
diff --git a/doc/jp/components/charts/features/chart-animations.md b/doc/jp/components/charts/features/chart-animations.md
index bb580ed57..40dceff84 100644
--- a/doc/jp/components/charts/features/chart-animations.md
+++ b/doc/jp/components/charts/features/chart-animations.md
@@ -28,7 +28,7 @@ _language: ja
関連するチャートタイプの詳細については、以下のトピックを参照してください。
- [チャート注釈](chart-annotations.md)
-- [チャート強調表示](chart-highlighting.md)
+- [チャートのハイライト表示](chart-highlighting.md)
- [チャート ツールチップ](chart-tooltips.md)
## API リファレンス
diff --git a/doc/jp/components/charts/features/chart-data-filtering b/doc/jp/components/charts/features/chart-data-filtering
new file mode 100644
index 000000000..5b6e0ff95
--- /dev/null
+++ b/doc/jp/components/charts/features/chart-data-filtering
@@ -0,0 +1,53 @@
+---
+title: {Platform} Chart Data Filtering | Data Visualization | Infragistics
+_description: Infragistics' {Platform} Chart Data Filtering
+_keywords: {Platform} Charts, Filtering, Infragistics
+mentionedTypes: ["CategoryChart"]
+namespace: Infragistics.Controls.Charts
+---
+
+# {Platform} Chart Data Filtering
+
+Data Filtering allows you to query large data in order to analyze and plot small subset of data entries via filter expressions, all without having to manually modify the datasource bound to the chart.
+
+A complete list of valid expressions and keywords to form a query string can be found here:
+
+[Filter expressions](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris)
+
+> NOTE: Any incorrect filter applied will result with an empty chart.
+
+## {Platform} Chart Data Filter Example
+
+The following example depicts a [Column Chart](../types/column-chart.md) of annual birth rates across several decades. The drop-down allows you to select a decade, which inserts an expression via the `InitialFilter` property, to update the chart visual and thus filtering out the other decades out.
+
+`sample="/charts/category-chart/data-filter", height="500", alt="{Platform} Data Filter Example"`
+
+
+
+The `InitialFilter` property is a string that requires the following syntax in order to filter properly. The value requires sets of parenthesesthat include both the filter expression definition, column and value associated with the record(s) filtering in.
+
+eg. To show all countries that start with the letter B:
+
+"(startswith(Country, 'B'))"
+
+eg. Concatenating more than one expression:
+
+"(startswith(Country, 'B') and endswith(Country, 'L') and contains(Product, 'Royal Oak') and contains(Date, '3/1/20'))"
+
+
+## Additional Resources
+
+You can find more information about related chart features in these topics:
+
+- [Chart Annotations](chart-annotations.md)
+- [Chart Highlighting](chart-highlighting.md)
+- [Chart Tooltips](chart-tooltips.md)
+
+## API References
+
+The following is a list of API members mentioned in the above sections:
+
+- `CategoryChart`
+- `IsTransitionInEnabled`
+- `TransitionInDuration`
+- `TransitionInMode`
\ No newline at end of file
diff --git a/doc/jp/components/charts/features/chart-highlight-filter.md b/doc/jp/components/charts/features/chart-highlight-filter.md
index 56df8a586..980892708 100644
--- a/doc/jp/components/charts/features/chart-highlight-filter.md
+++ b/doc/jp/components/charts/features/chart-highlight-filter.md
@@ -1,46 +1,46 @@
---
-title: {Platform} チャート強調表示フィルター | データ可視化 | インフラジスティックス
-_description: Infragistics の {Platform} チャート強調表示フィルター
-_keywords: {Platform} Charts, Highlighting, Filtering, Infragistics, {Platform} チャート, 強調表示, フィルターリング, インフラジスティックス
+title: {Platform} チャートのハイライト表示フィルター | データ可視化 | インフラジスティックス
+_description: Infragistics の {Platform} チャートのハイライト表示フィルター
+_keywords: {Platform} Charts, Highlighting, Filtering, Infragistics, {Platform} チャート, ハイライト表示, フィルターリング, インフラジスティックス
mentionedTypes: ["CategoryChart", "XamDataChart", "Series", "HighlightedValuesDisplayMode"]
namespace: Infragistics.Controls.Charts
_language: ja
---
-# {Platform} Chart 強調表示フィルター
+# {Platform} チャートのハイライト表示フィルター
-{ProductName} Chart コンポーネントは、プロットされたデータのサブセットを表示できるようにすることで、これらのチャートにプロットされた系列の視覚化を強化できるデータ強調表示オーバーレイをサポートしています。これを有効にすると、列シリーズおよびエリア シリーズ タイプの場合は不透明度を下げて全体セットが表示され、線シリーズ タイプの場合は破線が表示されることで、データのサブセットが強調表示されます。これは、データセットの目標値と実際の値などを視覚化するのに役立ちます。以下の例で、この機能を説明します。
+{ProductName} チャート コンポーネントは、プロットされたデータのサブセットを表示できるようにすることで、これらのチャートにプロットされた系列の視覚化を強化できるデータハイライト表示オーバーレイをサポートしています。これを有効にすると、列シリーズおよびエリア シリーズ タイプの場合は不透明度を下げて全体セットが表示され、線シリーズ タイプの場合は破線が表示されることで、データのサブセットがハイライト表示されます。これは、データセットの目標値と実際の値などを視覚化するのに役立ちます。以下の例で、この機能を説明します。
-`sample="/charts/data-chart/chart-highlight-filter-multiple-series", height="500", alt="{Platform} 強調表示フィルターの例"`
+`sample="/charts/data-chart/chart-highlight-filter-multiple-series", height="500", alt="{Platform} ハイライト表示フィルターの例"`
-データ強調表示機能は `XamDataChart` および `CategoryChart` でサポートされていますが、これらのコントロールの動作の性質上、それぞれ異なる方法で構成されることに注意してください。ただし、この機能で変わらない点は、強調表示を表示したい場合は `HighlightedValuesDisplayMode` プロパティを `Overlay` に設定する必要があることです。以下では、強調表示フィルター機能のさまざまな設定について説明します。
+データハイライト表示機能は `XamDataChart` および `CategoryChart` でサポートされていますが、これらのコントロールの動作の性質上、それぞれ異なる方法で構成されることに注意してください。ただし、この機能で変わらない点は、ハイライト表示を表示したい場合は `HighlightedValuesDisplayMode` プロパティを `Overlay` に設定する必要があることです。以下では、ハイライト表示フィルター機能のさまざまな設定について説明します。
-## DataChart での強調表示フィルターの使用
+## DataChart でのハイライト表示フィルターの使用
-`XamDataChart` では、強調表示フィルター API の多くは主に、強調表示するデータのサブセットを表すコレクションに `HighlightedItemsSource` プロパティを設定することによって、シリーズ自体で発生します。`HighlightedItemsSource` 内の項目の数は、強調表示するシリーズの `ItemsSource` にバインドされているデータの数と一致する必要があります。カテゴリ シリーズの場合は、デフォルトで強調表示パスとして定義した `ValueMemberPath` が使用されます。このページの上部にあるサンプルでは、`XamDataChart` の `HighlightedItemsSource` を使用してオーバーレイを表示しています。
+`XamDataChart` では、ハイライト表示フィルター API の多くは主に、ハイライト表示するデータのサブセットを表すコレクションに `HighlightedItemsSource` プロパティを設定することによって、シリーズ自体で発生します。`HighlightedItemsSource` 内の項目の数は、ハイライト表示するシリーズの `ItemsSource` にバインドされているデータの数と一致する必要があります。カテゴリ シリーズの場合は、デフォルトでハイライト表示パスとして定義した `ValueMemberPath` が使用されます。このページの上部にあるサンプルでは、`XamDataChart` の `HighlightedItemsSource` を使用してオーバーレイを表示しています。
-シリーズの `HighlightedItemsSource` と `ItemsSource` の間でスキーマが一致しない場合は、シリーズの `HighlightedValueMemberPath` プロパティを使用してこれを構成できます。さらに、シリーズ自体の `ItemsSource` を強調表示ソースとして使用し、サブセットを表すデータ項目にパスを設定したい場合は、これを行うことができます。これは、`HighlightedItemsSource` を提供せずに、`HighlightedValueMemberPath` プロパティをそのパスに設定するだけで行われます。
+シリーズの `HighlightedItemsSource` と `ItemsSource` の間でスキーマが一致しない場合は、シリーズの `HighlightedValueMemberPath` プロパティを使用してこれを構成できます。さらに、シリーズ自体の `ItemsSource` をハイライト表示ソースとして使用し、サブセットを表すデータ項目にパスを設定したい場合は、これを行うことができます。これは、`HighlightedItemsSource` を提供せずに、`HighlightedValueMemberPath` プロパティをそのパスに設定するだけで行われます。
列およびエリア シリーズ の場合の不透明度の低減は、シリーズの `HighlightedValuesFadeOpacity` プロパティを設定することで構成できます。オーバーレイをまったく表示したくない場合は、`HighlightedValuesDisplayMode` プロパティを `Hidden` に設定することもできます。
-強調表示フィルターによって表示されるシリーズの部分は、チャートの凡例レイヤーとツールチップ レイヤーに個別に表示されます。`HighlightedTitleSuffix` を設定することで、ツールチップと凡例に表示されるタイトルを構成できます。これにより、指定した値がシリーズの `Title` の末尾に追加されます。
+ハイライト表示フィルターによって表示されるシリーズの部分は、チャートの凡例レイヤーとツールチップ レイヤーに個別に表示されます。`HighlightedTitleSuffix` を設定することで、ツールチップと凡例に表示されるタイトルを構成できます。これにより、指定した値がシリーズの `Title` の末尾に追加されます。
-次の例は、`HighlightedValueMemberPath` を使用した `XamDataChart` コントロール内のデータ強調表示オーバーレイ機能の使用法を示しています。
+次の例は、`HighlightedValueMemberPath` を使用した `XamDataChart` コントロール内のデータハイライト表示オーバーレイ機能の使用法を示しています。
-`sample="/charts/data-chart/chart-highlight-filter", height="500", alt="{Platform} 強調表示フィルターの例"`
+`sample="/charts/data-chart/chart-highlight-filter", height="500", alt="{Platform} ハイライト表示フィルターの例"`
-## CategoryChart での強調表示フィルターの使用
+## CategoryChart でのハイライト表示フィルターの使用
-`CategoryChart` 強調表示フィルターは、`InitialHighlightFilter` プロパティを設定することによってチャート上で発生します。`CategoryChart` は、デフォルトで、基になるデータ項目のすべてのプロパティを考慮します。そのため、データのサブセットをフィルタリングできるようにデータをグループ化および集計できるように、チャート上でも `InitialGroups` を定義する必要があります。`InitialGroups` を基になるデータ項目の値パスに設定して、重複した値を持つパスでグループ化することができます。
+`CategoryChart` ハイライト表示フィルターは、`InitialHighlightFilter` プロパティを設定することによってチャート上で発生します。`CategoryChart` は、デフォルトで、基になるデータ項目のすべてのプロパティを考慮します。そのため、データのサブセットをフィルタリングできるようにデータをグループ化および集計できるように、チャート上でも `InitialGroups` を定義する必要があります。`InitialGroups` を基になるデータ項目の値パスに設定して、重複した値を持つパスでグループ化することができます。
`XamDataChart` と同様に、`HighlightedValuesDisplayMode` プロパティも `CategoryChart` で公開されます。オーバーレイを表示したくない場合は、このプロパティを `Hidden` に設定できます。
-以下の例は、`CategoryChart` コントロール内でのデータ強調表示オーバーレイ機能の使用法を示しています。
+以下の例は、`CategoryChart` コントロール内でのデータハイライト表示オーバーレイ機能の使用法を示しています。
-`sample="/charts/category-chart/chart-highlight-filter", height="500", alt="{Platform} 強調表示フィルターの例"`
+`sample="/charts/category-chart/chart-highlight-filter", height="500", alt="{Platform} ハイライト表示フィルターの例"`
+
+
+```html
+
+
+
+```
+```ts
+constructor() {
+ let grid = document.getElementById("grid") as IgcGridComponent;
+ grid.data = this.data
+}
+```
+
+```tsx
+
+
+
+```
+
```razor
<{ComponentSelector} Data=data AutoGenerate="true" AllowAdvancedFiltering="true">
{ComponentSelector}>
```
+
-```razor
-
-
-
-```
-
-
-
```html
-<{ComponentSelector} id="grid" auto-generate="true" allow-advanced-filtering="true">
+
-{ComponentSelector}>
+
```
```ts
constructor() {
- let grid = (document.getElementById("grid") as IgcGridComponent);
- grid.data = this.data
+ let treeGrid = document.getElementById("treeGrid") as IgcTreeGridComponent;
+ treeGrid.data = this.data
}
```
-
-```html
-
-
-
+```tsx
+
+
+
```
+```razor
+
+
+
+```
+
+
+```html
+
+
+
+```
```ts
constructor() {
- let grid = document.getElementById("grid") as IgcTreeGridComponent;
- grid.data = this.data
+ let hierarchicalGrid = document.getElementById("hierarchicalGrid") as IgcHierarchicalGridComponent;
+ hierarchicalGrid.data = this.data
}
```
-
+
-
-
-```html
-<{ComponentSelector} data={this.nwindData} autoGenerate="false" ref={this.gridRef} allowAdvancedFiltering="true">
-
-
-
-
-
-{ComponentSelector}>
+
+
+```razor
+
+
+
```
-
+
+
+
```tsx
-<{ComponentSelector} data={nwindData} autoGenerate="false" ref={gridRef} allowAdvancedFiltering="true">
+
-{ComponentSelector}>
+
```
+
高度なフィルタリングは、`AdvancedFilteringExpressionsTree` 入力プロパティに保存される `FilteringExpressionsTree` を生成します。`AdvancedFilteringExpressionsTree` プロパティを使用して、高度なフィルタリングの初期状態を設定できます。
@@ -197,6 +220,7 @@ componentDidMount() {
```-->
+
`{ComponentName}` ツールバーを表示したくない場合は、`OpenAdvancedFilteringDialog` および `CloseAdvancedFilteringDialog` メソッドを使用して、高度なフィルタリング ダイアログをコーディングを使用して開いたり閉じたりできます。
> [!Note]
@@ -543,27 +567,22 @@ $custom-drop-down: drop-down-theme(
定義済みのテーマに加えて、利用可能な [CSS プロパティ](../theming.md)のいくつかを設定することで、グリッドをさらにカスタマイズできます。
一部の色を変更したい場合は、最初にグリッドのクラスを設定する必要があります。
+
```html
-
-```
-
-```razor
-
+<{ComponentSelector} class="grid">{ComponentSelector}>
```
+
-
-
-
-```html
-
+
+```tsx
+<{ComponentSelector} className="grid">{ComponentSelector}>
```
+
```razor
-
+<{ComponentSelector} class="grid">{ComponentSelector}>
```
-
-
次に、そのクラスに関連する CSS プロパティを設定します。
```css
diff --git a/doc/jp/components/grids/_shared/cell-editing.md b/doc/jp/components/grids/_shared/cell-editing.md
index 5af1ba25e..039e1a196 100644
--- a/doc/jp/components/grids/_shared/cell-editing.md
+++ b/doc/jp/components/grids/_shared/cell-editing.md
@@ -85,7 +85,9 @@ public updateCell() {
```
```razor
-this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel')
+@code {
+ this.treeGrid.UpdateCell(newValue, rowID, 'ReorderLevel');
+}
```
@@ -97,7 +99,9 @@ public updateCell() {
```
```razor
-this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel')
+@code {
+ this.hierarchicalGrid.UpdateCell(newValue, rowID, 'ReorderLevel');
+}
```
@@ -117,9 +121,11 @@ public updateCell() {
```razor
-private UpdateCell() {
- IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel");
- cell.Update(70);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.grid1.GetCellByColumn(rowIndex, "ReorderLevel");
+ cell.Update(70);
+ }
}
```
@@ -146,9 +152,11 @@ public updateCell() {
```
```razor
-private UpdateCell() {
- IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age");
- cell.Update(9999);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.treeGrid.GetCellByColumn(rowIndex, "Age");
+ cell.Update(9999);
+ }
}
```
@@ -164,9 +172,11 @@ public updateCell() {
```
```razor
-private UpdateCell() {
- IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel");
- cell.Update(70);
+@code {
+ private UpdateCell() {
+ IgbCell cell = this.hierarchicalGrid.GetCellByColumn(rowIndex, "ReorderLevel");
+ cell.Update(70);
+ }
}
```
@@ -233,6 +243,8 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => {
セルに適用されるカスタム テンプレートを提供する場合は、そのテンプレートをセル自体またはそのヘッダーに渡すことができます。まず、通常どおりに列を作成します。
+
+
@@ -253,7 +265,7 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => {
@@ -261,6 +273,19 @@ public classEditTemplate = (ctx: IgcCellTemplateContext) => {
```
+
+```razor
+
+
+```
+
+
そしてテンプレートを渡します:
```razor
@@ -295,7 +320,6 @@ igRegisterScript("WebGridCellEditCellTemplate", (ctx) => {
field="Race"
data-type="string"
editable="true"
- name="column1"
id="column1">
```
@@ -343,73 +367,88 @@ public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
field="Category"
data-type="string"
editable="true"
- name="column1"
id="column1">
```
そして、テンプレートを index.ts ファイルのこの列に渡します。
-```typescript
+```ts
+
constructor() {
- var treeGrid = document.getElementById('treeGrid') as {ComponentName}Component;
+ var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
var column1 = document.getElementById('column1') as IgcColumnComponent;
- treeGrid.data = this.ordersTreeData;
- column1.inlineEditorTemplate = this.webTreeGridCellEditCellTemplate;
+ treeGrid.data = this.webGridCellEditSampleRoleplay;
+ column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
+ column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
+ column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
+public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
+ let cellValues: any = [];
+ let uniqueValues: any = [];
+ for(const i of (this.webGridCellEditSampleRoleplay as any)){
+ const field: string = ctx.cell.column.field;
+ if(uniqueValues.indexOf(i[field]) === -1 )
+ {
+ cellValues.push(html`${(i[field])}`);
+ uniqueValues.push(i[field]);
+ }
+ }
+ return html`
+ ctx.cell.editValue = e.detail.value}>
+ ${cellValues}
+
+ `;
+}
```
+
+
+
+```html
+
+
+```
+
+そして、テンプレートを index.ts ファイルのこの列に渡します。
-
```ts
constructor() {
- var treeGrid = document.getElementById('treeGrid') as IgcTreeGridComponent;
- var column1 = document.getElementById('column1') as IgcColumnComponent;
- var column2 = document.getElementById('column2') as IgcColumnComponent;
- var column3 = document.getElementById('column3') as IgcColumnComponent;
-
- treeGrid.data = this.webGridCellEditSampleRoleplay;
- column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
- column2.inlineEditorTemplate = this.webGridCellEditCellTemplate;
- column3.inlineEditorTemplate = this.webGridCellEditCellTemplate;
-}
-
-private _webGridCellEditSampleRoleplay: WebGridCellEditSampleRoleplay = null;
-public get webGridCellEditSampleRoleplay(): WebGridCellEditSampleRoleplay {
- if (this._webGridCellEditSampleRoleplay == null)
- {
- this._webGridCellEditSampleRoleplay = new WebGridCellEditSampleRoleplay();
- }
+ var hierarchicalGrid = document.getElementById('hierarchicalGrid') as IgcHierarchicalGridComponent;
+ var column1 = document.getElementById('column1') as IgcColumnComponent;
- return this._webGridCellEditSampleRoleplay;
+ hierarchicalGrid.data = this.singersData;
+ column1.inlineEditorTemplate = this.webGridCellEditCellTemplate;
}
public webGridCellEditCellTemplate = (ctx: IgcCellTemplateContext) => {
- let cellValues: any = [];
- let uniqueValues: any = [];
- for(const i of (this.webGridCellEditSampleRoleplay as any)){
- const field: string = ctx.cell.column.field;
- if(uniqueValues.indexOf(i[field]) === -1 )
- {
- cellValues.push(html`${(i[field])}`);
- uniqueValues.push(i[field]);
- }
+ let cellValues: any = [];
+ let uniqueValues: any = [];
+ for(const i of (this.singersData as any)){
+ const field: string = ctx.cell.column.field;
+ if(uniqueValues.indexOf(i[field]) === -1 )
+ {
+ cellValues.push(html`${(i[field])}`);
+ uniqueValues.push(i[field]);
}
- return html`
- ctx.cell.editValue = e.detail.value}>
- ${cellValues}
-
- `;
+ }
+ return html`
+ ctx.cell.editValue = e.detail.value}>
+ ${cellValues}
+
+ `;
}
```
-
+
-
-
セルに適用されるカスタム テンプレートを提供する場合は、そのテンプレートをセル自体またはそのヘッダーに渡すことができます。まず、通常どおりに列を作成します。
@@ -449,19 +488,15 @@ const webGridCellEditCellTemplate = useCallback((ctx: IgrCellTemplateContext) =>
useEffect(() => {
const column1 = grid1Ref.current.getColumnByName('column1');
- const column2 = grid1Ref.current.getColumnByName('column2');
- const column3 = grid1Ref.current.getColumnByName('column3');
grid1Ref.current.data = webGridCellEditSampleRoleplay;
column1.inlineEditorTemplate = webGridCellEditCellTemplate;
- column2.inlineEditorTemplate = webGridCellEditCellTemplate;
- column3.inlineEditorTemplate = webGridCellEditCellTemplate;
}, [webGridCellEditSampleRoleplay, webGridCellEditCellTemplate]);
```
-上記のサンプルは、さらに参照するためにここにあります。
+
上記のサンプルは、こちらで参照できます。
@@ -622,9 +657,11 @@ this.grid.addRow(record);
```razor
-//Assuming we have a `GetNewRecord` method returning the new row data.
-const record = this.GetNewRecord();
-this.GridRef.AddRow(record);
+@code {
+ //Assuming we have a `GetNewRecord` method returning the new row data.
+ const record = this.GetNewRecord();
+ this.GridRef.AddRow(record);
+}
```
@@ -662,7 +699,14 @@ public addRow() {
// Adding a new record
// Assuming we have a `getNewRecord` method returning the new row data
const record = this.getNewRecord();
- this.hierarchicalGrid.addRow(record, 1);
+ this.hierarchicalGrid.addRow(record);
+}
+```
+```razor
+@code {
+ //Assuming we have a `GetNewRecord` method returning the new row data.
+ const record = this.GetNewRecord();
+ this.HierarchicalGridRef.AddRow(record);
}
```
@@ -709,18 +753,20 @@ row.update(newData);
```razor
-// Updating the whole row
-this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+@code {
+ // Updating the whole row
+ this.grid.UpdateRow(newData, this.selectedCell.cellID.rowID);
-// Just a particular cell through the Grid API
-this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+ // Just a particular cell through the Grid API
+ this.grid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
-// Directly using the cell `update` method
-this.selectedCell.Update(newData);
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
-// Directly using the row `update` method
-const row = this.grid.GetRowByKey(rowID);
-row.Update(newData);
+ // Directly using the row `update` method
+ IgbRowType row = this.grid.GetRowByKey(rowID);
+ row.Update(newData);
+}
```
@@ -741,18 +787,20 @@ row.update(newData);
```
```razor
-// Updating the whole row
-this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+@code {
+ // Updating the whole row
+ this.treeGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
-// Just a particular cell through the Tree Grid API
-this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+ // Just a particular cell through the Tree Grid API
+ this.treeGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
-// Directly using the cell `update` method
-this.selectedCell.Update(newData);
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
-// Directly using the row `update` method
-const row = this.treeGrid.GetRowByKey(rowID);
-row.Update(newData);
+ // Directly using the row `update` method
+ IgbRowType row = this.treeGrid.GetRowByKey(rowID);
+ row.Update(newData);
+}
```
@@ -772,6 +820,23 @@ this.selectedCell.update(newData);
const row = this.hierarchicalGrid.getRowByKey(rowID);
row.update(newData);
```
+
+```razor
+@code {
+ // Updating the whole row
+ this.hierarchicalGrid.UpdateRow(newData, this.selectedCell.cellID.rowID);
+
+ // Just a particular cell through the Tree Grid API
+ this.hierarchicalGrid.UpdateCell(newData, this.selectedCell.cellID.rowID, this.selectedCell.column.field);
+
+ // Directly using the cell `update` method
+ this.selectedCell.Update(newData);
+
+ // Directly using the row `update` method
+ IgbRowType row = this.hierarchicalGrid.GetRowByKey(rowID);
+ row.Update(newData);
+}
+```
### {ComponentTitle} からデータを削除
@@ -796,16 +861,18 @@ row.delete();
grid1Ref.current.deleteRow(selectedCell.cellID.rowID);
// Delete row through row object
const row = grid1Ref.current.getRowByIndex(rowIndex);
-row.delete();
+row.del();
```
```razor
-// Delete row through Grid API
-this.grid.DeleteRow(this.selectedCell.cellID.rowID);
-// Delete row through row object
-const row = this.grid.GetRowByIndex(rowIndex);
-row.Delete();
+@code {
+ // Delete row through Grid API
+ this.grid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.grid.GetRowByIndex(rowIndex);
+ row.Del();
+}
```
@@ -820,15 +887,18 @@ row.delete();
```
```razor
-// Delete row through Tree Grid API
-this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID);
-// Delete row through row object
-const row = this.treeGrid.GetRowByIndex(rowIndex);
-row.Delete();
+@code {
+ // Delete row through Tree Grid API
+ this.treeGrid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.treeGrid.GetRowByIndex(rowIndex);
+ row.Del();
+}
```
+
```typescript
// Delete row through Grid API
this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
@@ -836,6 +906,27 @@ this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
const row = this.hierarchicalGrid.getRowByIndex(rowIndex);
row.delete();
```
+
+
+
+```typescript
+// Delete row through Grid API
+this.hierarchicalGrid.deleteRow(this.selectedCell.cellID.rowID);
+// Delete row through row object
+const row = this.hierarchicalGrid.getRowByIndex(rowIndex);
+row.del();
+```
+
+
+```razor
+@code {
+ // Delete row through Grid API
+ this.hierarchicalGrid.DeleteRow(this.selectedCell.cellID.rowID);
+ // Delete row through row object
+ IgbRowType row = this.hierarchicalGrid.GetRowByIndex(rowIndex);
+ row.Del();
+}
+```
`{ComponentName}` に関係なく、ボタンのクリックなどのユーザー インタラクションに関連付けできます。
@@ -903,6 +994,7 @@ constructor() {
```ts
constructor() {
var hGrid = document.getElementById('hGrid') as IgcHierarchicalGridComponent;
+ this.webHierarchicalGridCellEdit = this.webHierarchicalGridCellEdit.bind(this);
hGrid.addEventListener("cellEdit", this.webHierarchicalGridCellEdit);
}
```
@@ -1032,7 +1124,7 @@ igRegisterScript("HandleCellEdit", (ev) => {
-ここでは、2 つの列を検証しています。ユーザーが従業員の**Age (年齢、18歳未満)** または **Hire Date (雇用日、将来の日付)** に無効な値を設定しようとすると、編集がキャンセルされ (値は送信されません)、エラー メッセージ付きのトースターが表示されます。
+ここでは、2 つの列を検証しています。ユーザーが従業員の **Age (年齢、18 歳未満)** または **Hire Date (雇用日、将来の日付)** に無効な値を設定しようとすると、編集がキャンセルされ (値は送信されません)、エラー メッセージ付きのトースターが表示されます。
@@ -1040,31 +1132,68 @@ igRegisterScript("HandleCellEdit", (ev) => {
```typescript
-export class MyHGridEventsComponent {
- public handleCellEdit(event: IGridEditEventArgs) {
- const today = new Date();
- const column = event.column;
- if (column.field === 'Debut') {
- if (event.newValue > today.getFullYear()) {
- this.toast.message = 'The debut date must be in the past!';
- this.toast.open();
- event.cancel = true;
- }
- } else if (column.field === 'LaunchDate') {
- if (event.newValue > new Date()) {
- this.toast.message = 'The launch date must be in the past!';
- this.toast.open();
- event.cancel = true;
- }
+public webHierarchicalGridCellEdit(event: CustomEvent): void {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
}
}
}
```
+```razor
+*** In JavaScript ***
+igRegisterScript("HandleCellEdit", (ev) => {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
+ }
+ }
+}, false);
+```
+
ここでは、2 つの列を検証しています。ユーザーがアーティストの **Debut (デビュー)** 年またはアルバムの **Launch Date (発売日)** を変更しようとした際に、グリッドは今日よりも後の日付を許可しません。
+
+
+```tsx
+public handleCellEdit(sender: IgrHierarchicalGrid, event: IgrGridEditEventArgs): void {
+ const today = new Date();
+ const column = event.detail.column;
+ if (column.field === 'Debut') {
+ if (event.detail.newValue > today.getFullYear()) {
+ event.detail.cancel = true;
+ alert('The debut date must be in the past!');
+ }
+ } else if (column.field === 'LaunchDate') {
+ if (event.detail.newValue > today) {
+ event.detail.cancel = true;
+ alert('The launch date must be in the past!');
+ }
+ }
+}
+```
+
+
+
以下は、上記の検証が `{ComponentName}` に適用された結果のデモです。
`sample="/{ComponentSample}/editing-events", height="650", alt="{Platform} {ComponentTitle} 編集イベントの例"`
@@ -1108,6 +1237,10 @@ export class MyHGridEventsComponent {
```
+```tsx
+
+```
+
次に、そのクラスに関連する CSS プロパティを設定します。
```css
@@ -1118,6 +1251,29 @@ export class MyHGridEventsComponent {
```
+
+```html
+
+```
+
+```razor
+
+```
+
+```tsx
+
+```
+
+次に、そのクラスに関連する CSS プロパティを設定します。
+
+```css
+.hierarchicalGrid {
+ --ig-grid-edit-mode-color: orange;
+ --ig-grid-cell-editing-background: lightblue;
+}
+```
+
+
### スタイル設定の例
`sample="/{ComponentSample}/cell-editing-styling", height="650", alt="{Platform} {ComponentTitle} セル編集のスタイル設定の例"`
diff --git a/doc/jp/components/grids/_shared/cell-selection.md b/doc/jp/components/grids/_shared/cell-selection.md
index 6595fea17..c4e23197d 100644
--- a/doc/jp/components/grids/_shared/cell-selection.md
+++ b/doc/jp/components/grids/_shared/cell-selection.md
@@ -8,9 +8,9 @@ namespace: Infragistics.Controls
_language: ja
---
-# {Platform} セルの選択
+# {Platform} {ComponentTitle} セルの選択
-{Platform} {ComponentTitle} の {ProductName} セル選択により、豊富なデータ選択機能が有効になり、グリッド コンポーネントで強力な API が提供されます。 {Platform} {ComponentTitle} は、次の 3 つの選択モードをサポートしています。
+{Platform} {ComponentTitle} の {ProductName} セル選択により、豊富なデータ選択機能が有効になり、`{ComponentName}` コンポーネントで強力な API が提供されます。 {Platform} {ComponentTitle} は、次の 3 つの選択モードをサポートしています。
- {ComponentTitle} 複数セルの選択
- {ComponentTitle} 単一選択
@@ -32,7 +32,7 @@ _language: ja
## 選択タイプ
-### {ComponentTitle} 複数セルの選択
+### {Platform} {ComponentTitle} 複数セルの選択
これは、親グリッドと子グリッドの両方でのデフォルトのセル選択モードです。セルの選択は一度に 1 つのグリッドで行うことができますが、クロス グリッド範囲の選択を行うことか、複数のグリッドでセルを選択することはできないことに注意してください。範囲選択およびマウス ドラッグ機能に関連する各キーの組み合わせは、同じグリッドでのみ使用できます。
@@ -94,7 +94,7 @@ _language: ja
以下は、範囲の選択、選択の解除、または選択したセル データを取得する方法です。
-
+
### 範囲の選択
@@ -112,7 +112,29 @@ const range = { rowStart: 2, rowEnd: 2, columnStart: 1, columnEnd: 1 };
gridRef.current.selectRange(range);
```
-
+
+
+```razor
+<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true><{ComponentSelector}>
+
+@code {
+ private {ComponentSelector} grid;
+
+ private async void SetSelection()
+ {
+ IgbGridSelectionRange selectionRange = new IgbGridSelectionRange();
+ selectionRange.ColumnStart = 1;
+ selectionRange.ColumnEnd = 1;
+ selectionRange.RowStart = 2;
+ selectionRange.RowEnd = 2;
+
+ this.grid.SelectRange(new IgbGridSelectionRange[] {});
+ }
+}
+```
+
+
+
### セル選択のクリア
@@ -145,10 +167,10 @@ gridRef.current.clearCellSelection();
`GetSelectedData` は、選択されたデータの配列をディクショナリで返します。以下は例です。
```razor
-
+<{ComponentSelector} @ref=grid CellSelection="GridSelectionMode.Multiple" AutoGenerate=true><{ComponentSelector}>
@code {
- private IgbGrid grid;
+ private {ComponentSelector} grid;
private async void GetSelectedData()
{
@@ -301,6 +323,35 @@ expectedData = [
+
+
+
+```ts
+
+```
+
+
+```tsx
+
+```
+
+```razor
+
+```
+
+Then set the related CSS properties for that class:
+
+```css
+.hGrid {
+ --ig-grid-cell-selected-text-color: #fff;
+ --ig-grid-cell-active-border-color: #f2c43c;
+ --ig-grid-cell-selected-background: #0062a3;
+ --ig-grid-cell-editing-background: #0062a3;
+}
+```
+
+
+
### デモ
`sample="/{ComponentSample}/cell-selection-style", height="620", alt="{Platform} {ComponentTitle} セル選択のスタイル設定の例"`
@@ -366,7 +417,7 @@ $custom-grid-theme: grid-theme(
```
-カスタム テーマを適用すると、選択したグリッドセルが選択した色で強調表示されます。
+カスタム テーマを適用すると、選択したグリッドセルが選択した色でハイライト表示されます。
### デモ
`sample="/{ComponentSample}/multi-cell-selection-style", height="620", alt="{Platform} {ComponentTitle} 複数セル選択の例"`
@@ -382,9 +433,10 @@ $custom-grid-theme: grid-theme(
* `{ComponentName}`
+
## その他のリソース
-
+
* [選択](selection.md)
* [行選択](row-selection.md)
* [フィルタリング](filtering.md)
diff --git a/doc/jp/components/grids/_shared/collapsible-column-groups.md b/doc/jp/components/grids/_shared/collapsible-column-groups.md
index b191c9138..c35a9fabd 100644
--- a/doc/jp/components/grids/_shared/collapsible-column-groups.md
+++ b/doc/jp/components/grids/_shared/collapsible-column-groups.md
@@ -215,12 +215,21 @@ public indTemplate = (ctx: IgcColumnTemplateContext) => {
```
```tsx
- function collapsibleIndicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) {
+
+
+
+
+
+
+
+
+
+function indicatorTemplate(e: { dataContext: IgrColumnTemplateContext }) {
return (