@progress/kendo-angular-grid 12.0.0 → 12.0.1-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/column-menu/column-chooser.component.d.ts +14 -19
- package/column-menu/column-menu-autosize-all.component.d.ts +15 -27
- package/column-menu/column-menu-autosize.component.d.ts +15 -26
- package/column-menu/column-menu-chooser.component.d.ts +11 -24
- package/column-menu/column-menu-expandable-item.interface.d.ts +0 -1
- package/column-menu/column-menu-filter.component.d.ts +12 -24
- package/column-menu/column-menu-item.component.d.ts +6 -21
- package/column-menu/column-menu-lock.component.d.ts +11 -25
- package/column-menu/column-menu-position.component.d.ts +12 -24
- package/column-menu/column-menu-settings.interface.d.ts +3 -24
- package/column-menu/column-menu-sort.component.d.ts +12 -25
- package/column-menu/column-menu-stick.component.d.ts +12 -24
- package/column-menu/column-menu.component.d.ts +9 -1
- package/column-resizing/column-resize.interface.d.ts +1 -1
- package/columns/checkbox-column.component.d.ts +6 -57
- package/columns/column-base.d.ts +2 -0
- package/columns/column-group.component.d.ts +9 -48
- package/columns/column.component.d.ts +23 -109
- package/columns/command-column.component.d.ts +12 -60
- package/columns/reorder-column.component.d.ts +1 -1
- package/columns/sort-settings.d.ts +4 -8
- package/columns/span-column.component.d.ts +12 -123
- package/common/cell-click-event-args.interface.d.ts +1 -1
- package/data/change-event-args.interface.d.ts +2 -2
- package/data/data.collection.d.ts +1 -1
- package/dragdrop/column-reorder-config.d.ts +1 -1
- package/editing/add-event-args.interface.d.ts +1 -1
- package/editing/cancel-event-args.interface.d.ts +1 -1
- package/editing/edit-command.directive.d.ts +2 -2
- package/editing/edit-event-args.interface.d.ts +1 -1
- package/editing/edit-template.directive.d.ts +1 -2
- package/editing/remove-event-args.interface.d.ts +1 -1
- package/editing/save-event-args.interface.d.ts +1 -1
- package/editing-directives/edit-service.interface.d.ts +1 -1
- package/esm2020/column-menu/column-chooser.component.mjs +14 -19
- package/esm2020/column-menu/column-menu-autosize-all.component.mjs +15 -27
- package/esm2020/column-menu/column-menu-autosize.component.mjs +15 -26
- package/esm2020/column-menu/column-menu-chooser.component.mjs +11 -24
- package/esm2020/column-menu/column-menu-filter.component.mjs +12 -24
- package/esm2020/column-menu/column-menu-item.component.mjs +6 -21
- package/esm2020/column-menu/column-menu-lock.component.mjs +11 -25
- package/esm2020/column-menu/column-menu-position.component.mjs +12 -24
- package/esm2020/column-menu/column-menu-sort.component.mjs +12 -25
- package/esm2020/column-menu/column-menu-stick.component.mjs +12 -24
- package/esm2020/column-menu/column-menu.component.mjs +9 -1
- package/esm2020/columns/checkbox-column.component.mjs +6 -57
- package/esm2020/columns/column-base.mjs +1 -0
- package/esm2020/columns/column-group.component.mjs +9 -48
- package/esm2020/columns/column.component.mjs +22 -79
- package/esm2020/columns/command-column.component.mjs +12 -60
- package/esm2020/columns/reorder-column.component.mjs +1 -1
- package/esm2020/columns/span-column.component.mjs +12 -123
- package/esm2020/editing/edit-command.directive.mjs +2 -2
- package/esm2020/editing/edit-template.directive.mjs +1 -2
- package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +11 -10
- package/esm2020/filtering/cell/date-filter-cell.component.mjs +26 -13
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +15 -0
- package/esm2020/filtering/cell/numeric-filter-cell.component.mjs +14 -11
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +14 -15
- package/esm2020/filtering/date-filter.component.mjs +6 -2
- package/esm2020/filtering/menu/boolean-filter-menu.component.mjs +13 -13
- package/esm2020/filtering/menu/date-filter-menu.component.mjs +13 -13
- package/esm2020/filtering/menu/numeric-filter-menu.component.mjs +13 -13
- package/esm2020/filtering/menu/string-filter-menu.component.mjs +15 -2
- package/esm2020/filtering/numeric-filter.component.mjs +4 -1
- package/esm2020/filtering/operators/after-eq-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/after-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/before-eq-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/before-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/contains-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/ends-with-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/eq-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/gt-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/gte-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/is-empty-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/is-not-empty-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/is-not-null-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/isnull-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/lt-filter-operator.component.mjs +3 -5
- package/esm2020/filtering/operators/lte-filter-operator.component.mjs +3 -5
- package/esm2020/filtering/operators/neq-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/not-contains-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/operators/starts-with-filter-operator.component.mjs +2 -4
- package/esm2020/filtering/string-filter.component.mjs +2 -1
- package/esm2020/grid.component.mjs +38 -325
- package/esm2020/localization/custom-messages.component.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-info.component.mjs +1 -1
- package/esm2020/pager/pager-input.component.mjs +1 -48
- package/esm2020/pager/pager-next-buttons.component.mjs +1 -1
- package/esm2020/pager/pager-numeric-buttons.component.mjs +1 -1
- package/esm2020/pager/pager-page-sizes.component.mjs +3 -92
- package/esm2020/pager/pager-prev-buttons.component.mjs +1 -1
- package/esm2020/pdf/pdf-margin.component.mjs +9 -0
- package/esm2020/rendering/common/spacer.component.mjs +2 -1
- package/excel/excel.component.d.ts +2 -7
- package/fesm2015/progress-kendo-angular-grid.mjs +444 -1265
- package/fesm2020/progress-kendo-angular-grid.mjs +444 -1265
- package/filtering/cell/boolean-filter-cell.component.d.ts +11 -10
- package/filtering/cell/date-filter-cell.component.d.ts +26 -13
- package/filtering/cell/filter-cell-operators.component.d.ts +15 -0
- package/filtering/cell/numeric-filter-cell.component.d.ts +14 -11
- package/filtering/cell/string-filter-cell.component.d.ts +14 -15
- package/filtering/date-filter.component.d.ts +8 -12
- package/filtering/menu/boolean-filter-menu.component.d.ts +13 -13
- package/filtering/menu/date-filter-menu.component.d.ts +13 -13
- package/filtering/menu/numeric-filter-menu.component.d.ts +13 -13
- package/filtering/menu/string-filter-menu.component.d.ts +15 -2
- package/filtering/numeric-filter.component.d.ts +4 -1
- package/filtering/operators/after-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/after-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-filter-operator.component.d.ts +4 -0
- package/filtering/operators/contains-filter-operator.component.d.ts +2 -5
- package/filtering/operators/ends-with-filter-operator.component.d.ts +2 -4
- package/filtering/operators/eq-filter-operator.component.d.ts +2 -4
- package/filtering/operators/gt-filter-operator.component.d.ts +4 -0
- package/filtering/operators/gte-filter-operator.component.d.ts +2 -5
- package/filtering/operators/is-empty-filter-operator.component.d.ts +2 -4
- package/filtering/operators/is-not-empty-filter-operator.component.d.ts +2 -4
- package/filtering/operators/is-not-null-filter-operator.component.d.ts +2 -4
- package/filtering/operators/isnull-filter-operator.component.d.ts +2 -4
- package/filtering/operators/lt-filter-operator.component.d.ts +5 -0
- package/filtering/operators/lte-filter-operator.component.d.ts +5 -0
- package/filtering/operators/neq-filter-operator.component.d.ts +2 -4
- package/filtering/operators/not-contains-filter-operator.component.d.ts +2 -4
- package/filtering/operators/starts-with-filter-operator.component.d.ts +2 -4
- package/filtering/string-filter.component.d.ts +2 -1
- package/grid.component.d.ts +42 -327
- package/grouping/group-key.interface.d.ts +1 -13
- package/grouping/group-rows-args.interface.d.ts +1 -1
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/messages.d.ts +35 -98
- package/navigation/navigation-cell.interface.d.ts +2 -5
- package/navigation/navigation-row.interface.d.ts +2 -5
- package/package.json +19 -19
- package/pager/pager-info.component.d.ts +1 -1
- package/pager/pager-input.component.d.ts +1 -48
- package/pager/pager-next-buttons.component.d.ts +1 -1
- package/pager/pager-numeric-buttons.component.d.ts +1 -1
- package/pager/pager-page-sizes.component.d.ts +3 -92
- package/pager/pager-prev-buttons.component.d.ts +1 -1
- package/pager/pager-settings.d.ts +1 -26
- package/pdf/pdf-margin.component.d.ts +9 -0
- package/pdf/pdf-margin.interface.d.ts +0 -5
- package/rendering/common/spacer.component.d.ts +2 -1
- package/row-reordering/types.d.ts +1 -1
- package/schematics/ngAdd/index.js +2 -2
- package/scrolling/content-scroll-event.d.ts +1 -1
- package/scrolling/scroll-request.service.d.ts +2 -1
- package/selection/types.d.ts +7 -46
|
@@ -10,65 +10,14 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
import * as i1 from "./column-base";
|
|
11
11
|
import * as i2 from "../common/id.service";
|
|
12
12
|
/**
|
|
13
|
-
* Represents the checkbox for selecting
|
|
14
|
-
* defined as empty, it renders a default checkbox for row selection.
|
|
15
|
-
* You can also define the content of the column inside an `<ng-template>` tag.
|
|
16
|
-
* The input requires you to include the `SelectionCheckbox` option.
|
|
17
|
-
*
|
|
18
|
-
* The template context is set to the current data item and the following additional fields are passed:
|
|
19
|
-
* - `columnIndex`—The current column index.
|
|
20
|
-
* - `rowIndex`—The current data row index. If inside a new item row, it will be `-1`.
|
|
21
|
-
* - `dataItem`—The current data item.
|
|
22
|
-
* - `column`—The current column instance.
|
|
23
|
-
* - `isNew`—The state of the current item.
|
|
24
|
-
*
|
|
25
|
-
* For more examples, refer to:
|
|
26
|
-
* - [Selecting or deselecting all items on a page]({% slug selection_grid %}#toc-select-all-feature)
|
|
27
|
-
* - [Persisting the selection]({% slug selection_grid %}#toc-in-combination-with-the-select-all-feature)
|
|
13
|
+
* Represents the checkbox column for selecting rows in the Grid. [See example](slug:grid_row_selection#toc-select-all-checkbox).
|
|
28
14
|
*
|
|
29
15
|
* @example
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* <kendo-grid [data]="gridData" [selectable]="{enabled: true, checkboxOnly: true}">
|
|
36
|
-
* <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
|
|
37
|
-
* </kendo-grid-column>
|
|
38
|
-
* <kendo-grid-column field="ProductName" title="Product Name">
|
|
39
|
-
* </kendo-grid-column>
|
|
40
|
-
* <kendo-grid-checkbox-column title="Default checkbox">
|
|
41
|
-
* </kendo-grid-checkbox-column>
|
|
42
|
-
* <kendo-grid-checkbox-column title="Custom checkbox">
|
|
43
|
-
* <ng-template kendoGridCellTemplate let-idx="rowIndex">
|
|
44
|
-
* Select row <input [kendoGridSelectionCheckbox]="idx" />
|
|
45
|
-
* </ng-template>
|
|
46
|
-
* </kendo-grid-checkbox-column>
|
|
47
|
-
* </kendo-grid>
|
|
48
|
-
* `
|
|
49
|
-
* })
|
|
50
|
-
*
|
|
51
|
-
* class AppComponent {
|
|
52
|
-
* public gridData: any[];
|
|
53
|
-
*
|
|
54
|
-
* constructor() {
|
|
55
|
-
* this.gridData = products;
|
|
56
|
-
* }
|
|
57
|
-
* }
|
|
58
|
-
*
|
|
59
|
-
* const products = [{
|
|
60
|
-
* "ProductID": 1,
|
|
61
|
-
* "ProductName": "Chai",
|
|
62
|
-
* "UnitPrice": 18.0000,
|
|
63
|
-
* "Discontinued": true
|
|
64
|
-
* }, {
|
|
65
|
-
* "ProductID": 2,
|
|
66
|
-
* "ProductName": "Chang",
|
|
67
|
-
* "UnitPrice": 19.0000,
|
|
68
|
-
* "Discontinued": false
|
|
69
|
-
* }
|
|
70
|
-
* ];
|
|
71
|
-
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <kendo-grid [selectable]="{enabled: true, checkboxOnly: true}">
|
|
18
|
+
* <kendo-grid-checkbox-column title="Default checkbox"></kendo-grid-checkbox-column>
|
|
19
|
+
* <kendo-grid-column field="ProductID"></kendo-grid-column>
|
|
20
|
+
* </kendo-grid>
|
|
72
21
|
* ```
|
|
73
22
|
*/
|
|
74
23
|
export class CheckboxColumnComponent extends ColumnBase {
|
|
@@ -61,6 +61,7 @@ export class ColumnBase {
|
|
|
61
61
|
this.reorderable = true;
|
|
62
62
|
/**
|
|
63
63
|
* The width (in pixels) below which the user is not able to resize the column by using the UI ([see example]({% slug resizing_columns_grid %}#toc-limiting-the-resizing)).
|
|
64
|
+
* The `autoFitColumn` and `autoFitColumns` methods have higher priority.
|
|
64
65
|
* @default 10
|
|
65
66
|
*/
|
|
66
67
|
this.minResizableWidth = 10;
|
|
@@ -17,56 +17,17 @@ export function isColumnGroupComponent(column) {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Represents the column group header of the Grid
|
|
20
|
-
* ([more information and examples](
|
|
20
|
+
* ([more information and examples](slug:multicolumnheaders_columns_grid)).
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* Column index: {{columnIndex}} / column title: {{column.title}}
|
|
32
|
-
* </ng-template>
|
|
33
|
-
* <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
|
|
34
|
-
* </kendo-grid-column>
|
|
35
|
-
* <kendo-grid-column field="ProductName" title="Product Name">
|
|
36
|
-
* </kendo-grid-column>
|
|
37
|
-
* </kendo-grid-column-group>
|
|
38
|
-
* <kendo-grid-column field="UnitPrice" title="Unit Price" [width]="230">
|
|
39
|
-
* </kendo-grid-column>
|
|
40
|
-
* <kendo-grid-column field="Discontinued" [width]="120">
|
|
41
|
-
* <ng-template kendoGridCellTemplate let-dataItem>
|
|
42
|
-
* <input type="checkbox" [checked]="dataItem.Discontinued" disabled/>
|
|
43
|
-
* </ng-template>
|
|
44
|
-
* </kendo-grid-column>
|
|
45
|
-
* </kendo-grid>
|
|
46
|
-
* `
|
|
47
|
-
* })
|
|
48
|
-
*
|
|
49
|
-
* class AppComponent {
|
|
50
|
-
* public gridData: any[];
|
|
51
|
-
*
|
|
52
|
-
* constructor() {
|
|
53
|
-
* this.gridData = products;
|
|
54
|
-
* }
|
|
55
|
-
* }
|
|
56
|
-
*
|
|
57
|
-
* const products = [{
|
|
58
|
-
* "ProductID": 1,
|
|
59
|
-
* "ProductName": "Chai",
|
|
60
|
-
* "UnitPrice": 18.0000,
|
|
61
|
-
* "Discontinued": true
|
|
62
|
-
* }, {
|
|
63
|
-
* "ProductID": 2,
|
|
64
|
-
* "ProductName": "Chang",
|
|
65
|
-
* "UnitPrice": 19.0000,
|
|
66
|
-
* "Discontinued": false
|
|
67
|
-
* }
|
|
68
|
-
* ];
|
|
69
|
-
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <kendo-grid [data]="gridData">
|
|
25
|
+
* <kendo-grid-column-group title="Product Info">
|
|
26
|
+
* <kendo-grid-column field="ProductID"></kendo-grid-column>
|
|
27
|
+
* <kendo-grid-column field="ProductName"></kendo-grid-column>
|
|
28
|
+
* </kendo-grid-column-group>
|
|
29
|
+
* <kendo-grid-column field="UnitPrice"></kendo-grid-column>
|
|
30
|
+
* </kendo-grid>
|
|
70
31
|
* ```
|
|
71
32
|
*/
|
|
72
33
|
export class ColumnGroupComponent extends ColumnBase {
|
|
@@ -23,113 +23,56 @@ export function isColumnComponent(column) {
|
|
|
23
23
|
return isPresent(column.field);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Represents the
|
|
26
|
+
* Represents the column of the Grid. [See example](slug:columns_config#toc-using-the-column-component)
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
|
|
36
|
-
* </kendo-grid-column>
|
|
37
|
-
* <kendo-grid-column field="ProductName" title="Product Name">
|
|
38
|
-
* </kendo-grid-column>
|
|
39
|
-
* <kendo-grid-column field="UnitPrice" title="Unit Price" [width]="230">
|
|
40
|
-
* </kendo-grid-column>
|
|
41
|
-
* <kendo-grid-column field="Discontinued" [width]="120">
|
|
42
|
-
* <ng-template kendoGridCellTemplate let-dataItem>
|
|
43
|
-
* <input type="checkbox" [checked]="dataItem.Discontinued" disabled/>
|
|
44
|
-
* </ng-template>
|
|
45
|
-
* </kendo-grid-column>
|
|
46
|
-
* </kendo-grid>
|
|
47
|
-
* `
|
|
48
|
-
* })
|
|
49
|
-
*
|
|
50
|
-
* class AppComponent {
|
|
51
|
-
* public gridData: any[];
|
|
52
|
-
*
|
|
53
|
-
* constructor() {
|
|
54
|
-
* this.gridData = products;
|
|
55
|
-
* }
|
|
56
|
-
* }
|
|
57
|
-
*
|
|
58
|
-
* const products = [{
|
|
59
|
-
* "ProductID": 1,
|
|
60
|
-
* "ProductName": "Chai",
|
|
61
|
-
* "UnitPrice": 18.0000,
|
|
62
|
-
* "Discontinued": true
|
|
63
|
-
* }, {
|
|
64
|
-
* "ProductID": 2,
|
|
65
|
-
* "ProductName": "Chang",
|
|
66
|
-
* "UnitPrice": 19.0000,
|
|
67
|
-
* "Discontinued": false
|
|
68
|
-
* }
|
|
69
|
-
* ];
|
|
70
|
-
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <kendo-grid [data]="gridData">
|
|
31
|
+
* <kendo-grid-column field="ProductID" title="Product ID"></kendo-grid-column>
|
|
32
|
+
* <kendo-grid-column field="ProductName" title="Product Name"></kendo-grid-column>
|
|
33
|
+
* <kendo-grid-column field="UnitPrice" title="Unit Price"></kendo-grid-column>
|
|
34
|
+
* </kendo-grid>
|
|
71
35
|
* ```
|
|
72
36
|
*/
|
|
73
37
|
export class ColumnComponent extends ColumnBase {
|
|
74
38
|
constructor(parent, idService) {
|
|
75
39
|
super(parent, idService);
|
|
76
40
|
/**
|
|
77
|
-
* Allows the
|
|
78
|
-
*
|
|
41
|
+
* Allows the user to click the column headers and emits the `sortChange` event. [See example](slug:sorting_grid).
|
|
42
|
+
*
|
|
43
|
+
* @default true
|
|
79
44
|
*/
|
|
80
45
|
this.sortable = true;
|
|
81
46
|
/**
|
|
82
|
-
* Determines if the column can be dragged to the group panel.
|
|
47
|
+
* Determines if the column can be dragged to the group panel.
|
|
83
48
|
* If set to `false`, you can group the columns by the column field by using the API of the Grid.
|
|
49
|
+
*
|
|
50
|
+
* @default true
|
|
84
51
|
*/
|
|
85
52
|
this.groupable = true;
|
|
86
53
|
/**
|
|
87
|
-
* Defines the editor type
|
|
88
|
-
* Used when the column enters the edit mode.
|
|
54
|
+
* Defines the editor type. [See example](slug:inline_editing_grid#toc-using-reactive-forms).
|
|
55
|
+
* Used when the column enters the edit mode.
|
|
89
56
|
*
|
|
90
|
-
* @
|
|
91
|
-
* ```html-no-run
|
|
92
|
-
* <kendo-grid>
|
|
93
|
-
* <kendo-grid-column field="UnitPrice" editor="numeric">
|
|
94
|
-
* </kendo-grid-column>
|
|
95
|
-
* </kendo-grid>
|
|
96
|
-
* ```
|
|
57
|
+
* @default 'text'
|
|
97
58
|
*/
|
|
98
59
|
this.editor = 'text';
|
|
99
60
|
/**
|
|
100
|
-
* Defines the filter type that is displayed inside the filter row.
|
|
61
|
+
* Defines the filter type that is displayed inside the filter row. [See example](slug:filtering_grid#toc-filter-data-types).
|
|
101
62
|
*
|
|
102
|
-
* @
|
|
103
|
-
* ```html-no-run
|
|
104
|
-
* <kendo-grid>
|
|
105
|
-
* <kendo-grid-column field="UnitPrice" filter="numeric">
|
|
106
|
-
* </kendo-grid-column>
|
|
107
|
-
* </kendo-grid>
|
|
108
|
-
* ```
|
|
63
|
+
* @default 'text'
|
|
109
64
|
*/
|
|
110
65
|
this.filter = 'text';
|
|
111
66
|
/**
|
|
112
|
-
* Defines if a filter UI will be displayed for this column.
|
|
67
|
+
* Defines if a filter UI will be displayed for this column. [See example](slug:filtering_grid).
|
|
113
68
|
*
|
|
114
|
-
* @
|
|
115
|
-
* ```html-no-run
|
|
116
|
-
* <kendo-grid>
|
|
117
|
-
* <kendo-grid-column field="UnitPrice" [filterable]="false">
|
|
118
|
-
* </kendo-grid-column>
|
|
119
|
-
* </kendo-grid>
|
|
120
|
-
* ```
|
|
69
|
+
* @default true
|
|
121
70
|
*/
|
|
122
71
|
this.filterable = true;
|
|
123
72
|
/**
|
|
124
|
-
* Defines whether the column is editable.
|
|
73
|
+
* Defines whether the column is editable. [See example](slug:make_fields_uneditable_grid).
|
|
125
74
|
*
|
|
126
|
-
* @
|
|
127
|
-
* ```html-no-run
|
|
128
|
-
* <kendo-grid>
|
|
129
|
-
* <kendo-grid-column field="UnitPrice" [editable]="false">
|
|
130
|
-
* </kendo-grid-column>
|
|
131
|
-
* </kendo-grid>
|
|
132
|
-
* ```
|
|
75
|
+
* @default true
|
|
133
76
|
*/
|
|
134
77
|
this.editable = true;
|
|
135
78
|
}
|
|
@@ -11,68 +11,20 @@ import * as i1 from "./column-base";
|
|
|
11
11
|
import * as i2 from "../common/id.service";
|
|
12
12
|
/**
|
|
13
13
|
* Represents the command columns of the Grid. You have to define the content of the
|
|
14
|
-
* column inside an `<ng-template>` tag.
|
|
15
|
-
*
|
|
16
|
-
* and the command directives, refer to the article on
|
|
17
|
-
* [editing the Grid in Angular Reactive Forms]({% slug inline_editing_grid %}#toc-using-reactive-forms).
|
|
18
|
-
*
|
|
19
|
-
* The following additional fields are passed:
|
|
20
|
-
* - `columnIndex`—The current column index.
|
|
21
|
-
* - `rowIndex`—The current data row index. If inside a new item row, `rowIndex`is `-1`.
|
|
22
|
-
* - `dataItem`—The current data item.
|
|
23
|
-
* - `column`—The current column instance.
|
|
24
|
-
* - `isNew`—The state of the current item.
|
|
25
|
-
*
|
|
26
|
-
* Usually, the template contains CRUD command directives such as:
|
|
27
|
-
* - [EditCommandDirective]({% slug api_grid_editcommanddirective %})
|
|
28
|
-
* - [RemoveCommandDirective]({% slug api_grid_removecommanddirective %})
|
|
29
|
-
* - [CancelCommandDirective]({% slug api_grid_cancelcommanddirective %})
|
|
30
|
-
* - [SaveCommandDirective]({% slug api_grid_savecommanddirective %})
|
|
14
|
+
* column inside an `<ng-template>` tag.
|
|
15
|
+
* For more information and examples, refer to the [Command Column Directives](slug:editing_directives_grid#toc-command-column-directives) article.
|
|
31
16
|
*
|
|
32
17
|
* @example
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* <kendo-grid-column field="UnitPrice" title="Unit Price" [width]="230">
|
|
44
|
-
* </kendo-grid-column>
|
|
45
|
-
* <kendo-grid-command-column title="command" [width]="220">
|
|
46
|
-
* <ng-template kendoGridCellTemplate>
|
|
47
|
-
* <button kendoGridEditCommand class="k-primary">Edit</button>
|
|
48
|
-
* <button kendoGridRemoveCommand>Remove</button>
|
|
49
|
-
* </ng-template>
|
|
50
|
-
* </kendo-grid-command-column>
|
|
51
|
-
* </kendo-grid>
|
|
52
|
-
* `
|
|
53
|
-
* })
|
|
54
|
-
*
|
|
55
|
-
* class AppComponent {
|
|
56
|
-
* public gridData: any[];
|
|
57
|
-
*
|
|
58
|
-
* constructor() {
|
|
59
|
-
* this.gridData = products;
|
|
60
|
-
* }
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
63
|
-
* const products = [{
|
|
64
|
-
* "ProductID": 1,
|
|
65
|
-
* "ProductName": "Chai",
|
|
66
|
-
* "UnitPrice": 18.0000,
|
|
67
|
-
* "Discontinued": true
|
|
68
|
-
* }, {
|
|
69
|
-
* "ProductID": 2,
|
|
70
|
-
* "ProductName": "Chang",
|
|
71
|
-
* "UnitPrice": 19.0000,
|
|
72
|
-
* "Discontinued": false
|
|
73
|
-
* }
|
|
74
|
-
* ];
|
|
75
|
-
*
|
|
18
|
+
* ```html
|
|
19
|
+
* <kendo-grid [data]="gridData">
|
|
20
|
+
* <kendo-grid-column field="ProductID"></kendo-grid-column>
|
|
21
|
+
* <kendo-grid-command-column title="command" [width]="220">
|
|
22
|
+
* <ng-template kendoGridCellTemplate>
|
|
23
|
+
* <button kendoGridEditCommand class="k-primary">Edit</button>
|
|
24
|
+
* <button kendoGridRemoveCommand>Remove</button>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-grid-command-column>
|
|
27
|
+
* </kendo-grid>
|
|
76
28
|
* ```
|
|
77
29
|
*/
|
|
78
30
|
export class CommandColumnComponent extends ColumnBase {
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
import * as i1 from "./column-base";
|
|
10
10
|
import * as i2 from "../common/id.service";
|
|
11
11
|
/**
|
|
12
|
-
* Represents the drag handle for reordering rows in the Grid
|
|
12
|
+
* Represents the drag handle for reordering rows in the Grid ([see example](slug:reordering_rows_grid))
|
|
13
13
|
*/
|
|
14
14
|
export class RowReorderColumnComponent extends ColumnBase {
|
|
15
15
|
constructor(parent, idService) {
|
|
@@ -26,62 +26,15 @@ export function isSpanColumnComponent(column) {
|
|
|
26
26
|
* [grouping]({% slug grouping_grid %}). Wrap the columns that will be
|
|
27
27
|
* merged inside the `<kendo-grid-span-column>` tag.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
* ```ts-preview
|
|
31
|
-
*
|
|
32
|
-
* _@Component({
|
|
33
|
-
* selector: 'my-app',
|
|
34
|
-
* template: `
|
|
35
|
-
* <kendo-grid
|
|
36
|
-
* [sortable]="true"
|
|
37
|
-
* [filterable]="true"
|
|
38
|
-
* [kendoGridBinding]="products">
|
|
39
|
-
* <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
|
|
40
|
-
* </kendo-grid-column>
|
|
41
|
-
* <kendo-grid-span-column>
|
|
42
|
-
* <kendo-grid-column field="ProductName" title="Product Name">
|
|
43
|
-
* </kendo-grid-column>
|
|
44
|
-
* <kendo-grid-column field="UnitPrice" title="Unit Price" filter="numeric" [width]="180" format="{0:c}">
|
|
45
|
-
* </kendo-grid-column>
|
|
46
|
-
* </kendo-grid-span-column>
|
|
47
|
-
* <kendo-grid-column field="Discontinued" [width]="120" filter="boolean">
|
|
48
|
-
* <ng-template kendoGridCellTemplate let-dataItem>
|
|
49
|
-
* <input type="checkbox" [checked]="dataItem.Discontinued" disabled/>
|
|
50
|
-
* </ng-template>
|
|
51
|
-
* </kendo-grid-column>
|
|
52
|
-
* </kendo-grid>
|
|
53
|
-
* `
|
|
54
|
-
* })
|
|
55
|
-
*
|
|
56
|
-
* class AppComponent {
|
|
57
|
-
* public products = [{
|
|
58
|
-
* "ProductID": 1,
|
|
59
|
-
* "ProductName": "Chai",
|
|
60
|
-
* "UnitPrice": 18.0000,
|
|
61
|
-
* "Discontinued": true
|
|
62
|
-
* }, {
|
|
63
|
-
* "ProductID": 2,
|
|
64
|
-
* "ProductName": "Chang",
|
|
65
|
-
* "UnitPrice": 19.0000,
|
|
66
|
-
* "Discontinued": false
|
|
67
|
-
* }
|
|
68
|
-
* ];
|
|
69
|
-
* }
|
|
70
|
-
*
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
* By default, the data cell displays the data for the specified fields. To further customize
|
|
74
|
-
* the span-column functionality, use a [cell template]({% slug api_grid_celltemplatedirective %}).
|
|
75
|
-
*
|
|
76
|
-
* ```html-no-run
|
|
29
|
+
* ```html
|
|
77
30
|
* <kendo-grid-span-column>
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
31
|
+
* <kendo-grid-column field="field1"></kendo-grid-column>
|
|
32
|
+
* <kendo-grid-column field="field2"></kendo-grid-column>
|
|
33
|
+
* <ng-template kendoGridCellTemplate let-dataItem>
|
|
34
|
+
* <h5>{{ dataItem.field1 }}</h5>
|
|
35
|
+
* <p>{{ dataItem.field2 }}</p>
|
|
36
|
+
* </ng-template>
|
|
37
|
+
* </kendo-grid-span-column>
|
|
85
38
|
* ```
|
|
86
39
|
*/
|
|
87
40
|
export class SpanColumnComponent extends ColumnBase {
|
|
@@ -107,24 +60,9 @@ export class SpanColumnComponent extends ColumnBase {
|
|
|
107
60
|
}
|
|
108
61
|
}
|
|
109
62
|
/**
|
|
110
|
-
* Defines whether the edit template of the column will be rendered.
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```html-no-run
|
|
116
|
-
* <kendo-grid>
|
|
117
|
-
* <kendo-grid-span-column [editable]="false">
|
|
118
|
-
* <kendo-grid-column field="UnitPrice">
|
|
119
|
-
* </kendo-grid-column>
|
|
120
|
-
* <kendo-grid-column field="ProductName">
|
|
121
|
-
* </kendo-grid-column>
|
|
122
|
-
* <ng-template kendoGridEditTemplate>
|
|
123
|
-
* .....
|
|
124
|
-
* </ng-template>
|
|
125
|
-
* </kendo-grid-span-column>
|
|
126
|
-
* </kendo-grid>
|
|
127
|
-
* ```
|
|
63
|
+
* Defines whether the edit template of the column will be rendered.
|
|
64
|
+
* To enable the editing functionality for a spanned column, set an edit template for it ([see exmaple](slug:custom_reactive_editing_grid)).
|
|
65
|
+
* @default false
|
|
128
66
|
*/
|
|
129
67
|
set editable(value) {
|
|
130
68
|
this._editable = value;
|
|
@@ -168,57 +106,8 @@ export class SpanColumnComponent extends ColumnBase {
|
|
|
168
106
|
return this.childColumns.filter(c => c.isVisible).length;
|
|
169
107
|
}
|
|
170
108
|
/**
|
|
171
|
-
* Toggles the locked (frozen) state of the columns
|
|
172
|
-
* at all times during the horizontal scrolling of the Grid.
|
|
173
|
-
*
|
|
174
|
-
* For the option to work properly, make sure that:
|
|
175
|
-
* - Scrolling is enabled.
|
|
176
|
-
* - The `height` option of the Grid is set.
|
|
177
|
-
* - The widths of all Grid columns are explicitly set in pixels. In this way,
|
|
178
|
-
* the Grid adjusts the layout of the locked and unlocked columns.
|
|
179
|
-
*
|
|
109
|
+
* Toggles the locked (frozen) state of the columns ([see example](slug:locked_columns_grid)).
|
|
180
110
|
* @default false
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* ```ts
|
|
184
|
-
* _@Component({
|
|
185
|
-
* selector: 'my-app',
|
|
186
|
-
* template: `
|
|
187
|
-
* <kendo-grid [data]="gridData" [scrollable]="scrollable" style="height: 200px">
|
|
188
|
-
* <kendo-grid-span-column [locked]="true">
|
|
189
|
-
* <kendo-grid-column field="ProductID" title="Product ID" [width]="120">
|
|
190
|
-
* </kendo-grid-column>
|
|
191
|
-
* <kendo-grid-column field="ProductName" title="Product Name" [width]="200">
|
|
192
|
-
* </kendo-grid-column>
|
|
193
|
-
* </kendo-grid-span-column>
|
|
194
|
-
* <kendo-grid-column field="UnitPrice" title="Unit Price" [width]="230">
|
|
195
|
-
* </kendo-grid-column>
|
|
196
|
-
* </kendo-grid>
|
|
197
|
-
* `
|
|
198
|
-
* })
|
|
199
|
-
*
|
|
200
|
-
* class AppComponent {
|
|
201
|
-
* public gridData: any[];
|
|
202
|
-
*
|
|
203
|
-
* constructor() {
|
|
204
|
-
* this.gridData = products;
|
|
205
|
-
* }
|
|
206
|
-
* }
|
|
207
|
-
*
|
|
208
|
-
* const products = [{
|
|
209
|
-
* "ProductID": 1,
|
|
210
|
-
* "ProductName": "Chai",
|
|
211
|
-
* "UnitPrice": 18.0000,
|
|
212
|
-
* "Discontinued": true
|
|
213
|
-
* }, {
|
|
214
|
-
* "ProductID": 2,
|
|
215
|
-
* "ProductName": "Chang",
|
|
216
|
-
* "UnitPrice": 19.0000,
|
|
217
|
-
* "Discontinued": false
|
|
218
|
-
* }
|
|
219
|
-
* ];
|
|
220
|
-
*
|
|
221
|
-
* ```
|
|
222
111
|
*/
|
|
223
112
|
set locked(value) {
|
|
224
113
|
this._locked = value;
|
|
@@ -19,10 +19,10 @@ import * as i4 from "@angular/common";
|
|
|
19
19
|
* [edit]({% slug api_grid_gridcomponent %}#toc-edit) event
|
|
20
20
|
* is triggered ([see example]({% slug basics_editing_grid %})).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* When the row is in the `edit` mode, the button with `kendoGridEditCommand` is automatically hidden.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
* ```html
|
|
25
|
+
* ```html
|
|
26
26
|
* <kendo-grid>
|
|
27
27
|
* <kendo-grid-command-column title="command">
|
|
28
28
|
* <ng-template kendoGridCellTemplate>
|
|
@@ -10,8 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* tag with the `kendoGridEditTemplate` directive inside a `<kendo-grid-column>` tag.
|
|
11
11
|
*
|
|
12
12
|
* The template context is set to the current form group and the following additional fields are passed:
|
|
13
|
-
* - `formGroup`—The current [FormGroup](link:site.data.urls.angular['formgroupapi']). Represents the default context that will be assigned to any template variable which utilizes the `let-x` syntax
|
|
14
|
-
* If you use the Grid inside [Template-Driven Forms](link:site.data.urls.angular['forms']), it will be `undefined`.
|
|
13
|
+
* - `formGroup`—The current [FormGroup](link:site.data.urls.angular['formgroupapi']). Represents the default context that will be assigned to any template variable which utilizes the `let-x` syntax, for example, `let-formGroup`. If you use the Grid inside [Template-Driven Forms](link:site.data.urls.angular['forms']), it will be `undefined`.
|
|
15
14
|
* - `rowIndex`—The current data row index. If inside a new item row, `rowIndex` is `-1`. Use it as an alias for a template variable by utilizing the `let-rowIndex="rowIndex"` syntax.
|
|
16
15
|
* - `dataItem`—The current data item. Use it as an alias for a template variable by utilizing the `let-dataItem="dataItem"` syntax.
|
|
17
16
|
* - `column`—The current column instance. Use it as an alias for a template variable by utilizing the `let-column="column"` syntax.
|
|
@@ -18,19 +18,20 @@ import * as i6 from "../filter-input.directive";
|
|
|
18
18
|
import * as i7 from "../../navigation/focusable.directive";
|
|
19
19
|
/**
|
|
20
20
|
* Represents a Boolean filter-cell component.
|
|
21
|
+
* [See example](slug:filter_row#toc-built-in-filter-row-components).
|
|
21
22
|
*
|
|
22
23
|
* @example
|
|
23
24
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
25
|
+
* ```html
|
|
26
|
+
* <kendo-grid-column field="Discontinued">
|
|
27
|
+
* <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
|
|
28
|
+
* <kendo-grid-boolean-filter-cell
|
|
29
|
+
* [column]="column"
|
|
30
|
+
* [filter]="filter">
|
|
31
|
+
* </kendo-grid-boolean-filter-cell>
|
|
32
|
+
* </ng-template>
|
|
33
|
+
* </kendo-grid-column>
|
|
34
|
+
* ```
|
|
34
35
|
*/
|
|
35
36
|
export class BooleanFilterCellComponent extends BooleanFilterComponent {
|
|
36
37
|
constructor(filterService, localization, cd, sizingService) {
|
|
@@ -17,29 +17,42 @@ import * as i5 from "@progress/kendo-angular-dateinputs";
|
|
|
17
17
|
import * as i6 from "../filter-input.directive";
|
|
18
18
|
import * as i7 from "../../navigation/focusable.directive";
|
|
19
19
|
/**
|
|
20
|
-
* Represents a
|
|
20
|
+
* Represents a [DatePicker](slug:overview_datepicker) filter-cell component.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* ```
|
|
24
|
+
* ```html
|
|
25
|
+
* <kendo-grid-column field="FirstOrderedOn">
|
|
26
|
+
* <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
|
|
27
|
+
* <kendo-grid-date-filter-cell
|
|
28
|
+
* [column]="column"
|
|
29
|
+
* [filter]="filter">
|
|
30
|
+
* </kendo-grid-date-filter-cell>
|
|
31
|
+
* </ng-template>
|
|
32
|
+
* </kendo-grid-column>
|
|
33
|
+
* ```
|
|
35
34
|
*/
|
|
36
35
|
export class DateFilterCellComponent extends DateFilterComponent {
|
|
37
36
|
constructor(filterService, localization, sizingService) {
|
|
38
37
|
super(filterService, localization);
|
|
39
38
|
this.localization = localization;
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
40
|
+
* Represents a [DatePicker](slug:overview_datepicker) filter-cell component.
|
|
41
|
+
* [See example](slug:filter_row#toc-built-in-filter-row-components).
|
|
42
|
+
* @example
|
|
43
|
+
*
|
|
44
|
+
* ```html
|
|
45
|
+
* <kendo-grid-column field="Discontinued">
|
|
46
|
+
* <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
|
|
47
|
+
* <kendo-grid-date-filter-cell
|
|
48
|
+
* [column]="column"
|
|
49
|
+
* [filter]="filter">
|
|
50
|
+
* </kendo-grid-date-filter-cell>
|
|
51
|
+
* </ng-template>
|
|
52
|
+
* </kendo-grid-column>
|
|
53
|
+
* ```
|
|
42
54
|
* @type {boolean}
|
|
55
|
+
* @default true
|
|
43
56
|
*/
|
|
44
57
|
this.showOperators = true;
|
|
45
58
|
this.subs = sizingService.changes.subscribe((size) => this.size = size);
|