@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
|
@@ -32,8 +32,9 @@ export class StringFilterComponent extends BaseFilterCellComponent {
|
|
|
32
32
|
super(filterService);
|
|
33
33
|
this.localization = localization;
|
|
34
34
|
/**
|
|
35
|
-
* The default filter operator.
|
|
35
|
+
* The default filter operator.
|
|
36
36
|
* @type {string}
|
|
37
|
+
* @default 'contains'
|
|
37
38
|
*/
|
|
38
39
|
this.operator = "contains";
|
|
39
40
|
}
|
|
@@ -137,33 +137,11 @@ const handleExpandCollapseDetailsService = (service, expandEmitter, collapseEmit
|
|
|
137
137
|
const isInEditedCell = (element, gridElement) => closest(element, matchesClasses('k-grid-edit-cell')) &&
|
|
138
138
|
closest(element, matchesNodeName('kendo-grid')) === gridElement;
|
|
139
139
|
/**
|
|
140
|
-
* Represents the Kendo UI Grid component
|
|
140
|
+
* Represents the Kendo UI for Angular Data Grid component.
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
|
-
* ```
|
|
144
|
-
*
|
|
145
|
-
* selector: 'my-app',
|
|
146
|
-
* template: `
|
|
147
|
-
* <kendo-grid [data]="gridData">
|
|
148
|
-
* </kendo-grid>
|
|
149
|
-
* `
|
|
150
|
-
* })
|
|
151
|
-
* class AppComponent {
|
|
152
|
-
* public gridData: any[] = products;
|
|
153
|
-
* }
|
|
154
|
-
*
|
|
155
|
-
* const products = [{
|
|
156
|
-
* "ProductID": 1,
|
|
157
|
-
* "ProductName": "Chai",
|
|
158
|
-
* "UnitPrice": 18.0000,
|
|
159
|
-
* "Discontinued": true
|
|
160
|
-
* }, {
|
|
161
|
-
* "ProductID": 2,
|
|
162
|
-
* "ProductName": "Chang",
|
|
163
|
-
* "UnitPrice": 19.0000,
|
|
164
|
-
* "Discontinued": false
|
|
165
|
-
* }
|
|
166
|
-
* ];
|
|
143
|
+
* ```html
|
|
144
|
+
* <kendo-grid [data]="gridData"></kendo-grid>
|
|
167
145
|
* ```
|
|
168
146
|
*/
|
|
169
147
|
export class GridComponent {
|
|
@@ -199,64 +177,25 @@ export class GridComponent {
|
|
|
199
177
|
/**
|
|
200
178
|
* Defines the scroll mode used by the Grid.
|
|
201
179
|
*
|
|
202
|
-
*
|
|
203
|
-
* - `none`—Renders no scrollbar.
|
|
204
|
-
* - `scrollable`—The default scroll mode. It requires the setting of the `height` option.
|
|
205
|
-
* - `virtual`—Displays no pager and renders a portion of the data (optimized rendering) while the user is scrolling the content.
|
|
180
|
+
* @default 'scrollable'
|
|
206
181
|
*/
|
|
207
182
|
this.scrollable = 'scrollable';
|
|
208
183
|
/**
|
|
209
|
-
* Enables the single-row
|
|
184
|
+
* Enables the [single-row selection](slug:grid_row_selection) of the Grid.
|
|
185
|
+
*
|
|
186
|
+
* @default false
|
|
210
187
|
*/
|
|
211
188
|
this.selectable = false;
|
|
212
189
|
/**
|
|
213
190
|
* A function that defines how to track changes for the data rows.
|
|
214
|
-
*
|
|
215
191
|
* By default, the Grid tracks changes by the index of the data item.
|
|
216
192
|
* Edited rows are tracked by reference.
|
|
217
|
-
*
|
|
218
|
-
* for example, when you implement editing with immutable data items.
|
|
219
|
-
*
|
|
220
|
-
* The following example demonstrates how to track items only by index.
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```ts
|
|
224
|
-
* import { Component } from '@angular/core';
|
|
225
|
-
* import { GridItem } from '@progress/kendo-angular-grid';
|
|
226
|
-
*
|
|
227
|
-
* _@Component({
|
|
228
|
-
* selector: 'my-app',
|
|
229
|
-
* template: `
|
|
230
|
-
* <kendo-grid [data]="gridData" [trackBy]="trackBy">
|
|
231
|
-
* </kendo-grid>
|
|
232
|
-
* `
|
|
233
|
-
* })
|
|
234
|
-
* class AppComponent {
|
|
235
|
-
* public gridData: any[] = products;
|
|
236
|
-
*
|
|
237
|
-
* public trackBy(index: number, item: GridItem): any {
|
|
238
|
-
* console.log(item);
|
|
239
|
-
* return index;
|
|
240
|
-
* }
|
|
241
|
-
* }
|
|
242
|
-
*
|
|
243
|
-
* const products = [{
|
|
244
|
-
* "ProductID": 1,
|
|
245
|
-
* "ProductName": "Chai",
|
|
246
|
-
* "UnitPrice": 18.0000,
|
|
247
|
-
* "Discontinued": true
|
|
248
|
-
* }, {
|
|
249
|
-
* "ProductID": 2,
|
|
250
|
-
* "ProductName": "Chang",
|
|
251
|
-
* "UnitPrice": 19.0000,
|
|
252
|
-
* "Discontinued": false
|
|
253
|
-
* }
|
|
254
|
-
* ];
|
|
255
|
-
* ```
|
|
193
|
+
* [See exmpale](slug:track_changes_grid)
|
|
256
194
|
*/
|
|
257
195
|
this.trackBy = defaultTrackBy;
|
|
258
196
|
/**
|
|
259
197
|
* If set to `true`, the grid will render only the columns in the current viewport.
|
|
198
|
+
* @default false
|
|
260
199
|
*/
|
|
261
200
|
this.virtualColumns = false;
|
|
262
201
|
/**
|
|
@@ -265,35 +204,31 @@ export class GridComponent {
|
|
|
265
204
|
this.gridData = () => { return this.flatData; };
|
|
266
205
|
/**
|
|
267
206
|
* Enables the [filtering]({% slug filtering_grid %}) of the Grid columns that have their `field` option set.
|
|
207
|
+
* @default false
|
|
268
208
|
*/
|
|
269
209
|
this.filterable = false;
|
|
270
210
|
/**
|
|
271
211
|
* Enables the [sorting]({% slug sorting_grid %}) of the Grid columns that have their `field` option set.
|
|
212
|
+
* @default false
|
|
272
213
|
*/
|
|
273
214
|
this.sortable = false;
|
|
274
215
|
/**
|
|
275
|
-
* Configures the pager of the Grid ([see example](
|
|
276
|
-
*
|
|
277
|
-
* The available options are:
|
|
278
|
-
* - `buttonCount: Number`—Sets the maximum numeric buttons count before the buttons are collapsed. Defaults to `10`.
|
|
279
|
-
* - `info: Boolean`—Toggles the information about the current page and the total number of records. Defaults to `true`.
|
|
280
|
-
* - `type: PagerType`—Accepts the `numeric` (buttons with numbers) and `input` (input for typing the page number) values. Defaults to `'numeric'`.
|
|
281
|
-
* - `pageSizes: Boolean` or `Array<number>`—Shows a menu for selecting the page size. Defaults to `false`.
|
|
282
|
-
* - `previousNext: Boolean`—Toggles the **Previous** and **Next** buttons. Defaults to `true`.
|
|
283
|
-
* - `responsive: Boolean`—Toggles the built-in responsive behavior of the Pager. Defaults to `true`.
|
|
216
|
+
* Configures the pager of the Grid ([see example](slug:paging_grid_settings)).
|
|
217
|
+
* @default false
|
|
284
218
|
*/
|
|
285
219
|
this.pageable = false;
|
|
286
220
|
/**
|
|
287
|
-
* If set to `true`, the user can group the Grid by dragging the column header cells.
|
|
288
|
-
*
|
|
221
|
+
* If set to `true`, the user can group the Grid by dragging the column header cells ([see example]({% slug grouping_grid %})).
|
|
222
|
+
* @default false
|
|
289
223
|
*/
|
|
290
224
|
this.groupable = false;
|
|
291
225
|
/**
|
|
292
226
|
* Indicates whether the Grid columns will be resized during initialization so that
|
|
293
|
-
* they fit their headers and row content.
|
|
227
|
+
* they fit their headers and row content.
|
|
294
228
|
* Columns with `autoSize` set to `false` are excluded.
|
|
295
229
|
* To dynamically update the column width to match the new content,
|
|
296
230
|
* refer to [this example]({% slug resizing_columns_grid %}).
|
|
231
|
+
* @default false
|
|
297
232
|
*/
|
|
298
233
|
this.autoSize = false;
|
|
299
234
|
/**
|
|
@@ -318,8 +253,8 @@ export class GridComponent {
|
|
|
318
253
|
this.columnMenu = false;
|
|
319
254
|
/**
|
|
320
255
|
* Specifies if the header of the grid will be hidden. The header is visible by default.
|
|
321
|
-
*
|
|
322
|
-
*
|
|
256
|
+
* The header includes column headers and the [filter row](slug:filter_row).
|
|
257
|
+
* @default false
|
|
323
258
|
*/
|
|
324
259
|
this.hideHeader = false;
|
|
325
260
|
/**
|
|
@@ -680,50 +615,8 @@ export class GridComponent {
|
|
|
680
615
|
return this.navigable;
|
|
681
616
|
}
|
|
682
617
|
/**
|
|
683
|
-
* Defines a function that is executed for every data row in the component
|
|
684
|
-
*
|
|
685
|
-
* @example
|
|
686
|
-
* ```ts
|
|
687
|
-
* import { Component, ViewEncapsulation } from '@angular/core';
|
|
688
|
-
* import { RowClassArgs } from '@progress/kendo-angular-grid';
|
|
689
|
-
*
|
|
690
|
-
* _@Component({
|
|
691
|
-
* selector: 'my-app',
|
|
692
|
-
* encapsulation: ViewEncapsulation.None,
|
|
693
|
-
* styles: [`
|
|
694
|
-
* .k-grid tr.even { background-color: #f45c42; }
|
|
695
|
-
* .k-grid tr.odd { background-color: #41f4df; }
|
|
696
|
-
* `],
|
|
697
|
-
* template: `
|
|
698
|
-
* <kendo-grid [data]="gridData" [rowClass]="rowCallback">
|
|
699
|
-
* </kendo-grid>
|
|
700
|
-
* `
|
|
701
|
-
* })
|
|
702
|
-
* class AppComponent {
|
|
703
|
-
* public gridData: any[] = products;
|
|
704
|
-
*
|
|
705
|
-
* public rowCallback(context: RowClassArgs) {
|
|
706
|
-
* const isEven = context.index % 2 === 0;
|
|
707
|
-
* return {
|
|
708
|
-
* even: isEven,
|
|
709
|
-
* odd: !isEven
|
|
710
|
-
* };
|
|
711
|
-
* }
|
|
712
|
-
* }
|
|
713
|
-
*
|
|
714
|
-
* const products = [{
|
|
715
|
-
* "ProductID": 1,
|
|
716
|
-
* "ProductName": "Chai",
|
|
717
|
-
* "UnitPrice": 18.0000,
|
|
718
|
-
* "Discontinued": true
|
|
719
|
-
* }, {
|
|
720
|
-
* "ProductID": 2,
|
|
721
|
-
* "ProductName": "Chang",
|
|
722
|
-
* "UnitPrice": 19.0000,
|
|
723
|
-
* "Discontinued": false
|
|
724
|
-
* }
|
|
725
|
-
* ];
|
|
726
|
-
* ```
|
|
618
|
+
* Defines a function that is executed for every data row in the component
|
|
619
|
+
* ([see example](slug:styling_grid_rows)).
|
|
727
620
|
*/
|
|
728
621
|
set rowClass(fn) {
|
|
729
622
|
if (isDevMode() && typeof fn !== 'function') {
|
|
@@ -1024,9 +917,9 @@ export class GridComponent {
|
|
|
1024
917
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
1025
918
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
1026
919
|
*
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
920
|
+
* The `expandGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
921
|
+
*
|
|
922
|
+
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
1030
923
|
*
|
|
1031
924
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
1032
925
|
*/
|
|
@@ -1040,9 +933,9 @@ export class GridComponent {
|
|
|
1040
933
|
* This method is provided only for backwards-compatibility with legacy versions.
|
|
1041
934
|
* These versions tracked the expanded group state internally using the hierarchical group index.
|
|
1042
935
|
*
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
936
|
+
* The `collapseGroup` method is not supported when you use the [kendoGridGroupBinding]({% slug api_grid_groupbindingdirective %}) directive.
|
|
937
|
+
*
|
|
938
|
+
* When a Grid is pageable, the indexes of the groups are offset by the current Grid [skip]({% slug api_grid_gridcomponent %}#toc-skip).
|
|
1046
939
|
*
|
|
1047
940
|
* @param {string} index - The underscore separated hierarchical index of the group.
|
|
1048
941
|
*/
|
|
@@ -1300,7 +1193,7 @@ export class GridComponent {
|
|
|
1300
1193
|
this.focusEditElement('.k-grid-add-row');
|
|
1301
1194
|
}
|
|
1302
1195
|
/**
|
|
1303
|
-
* Puts the cell that is specified by the table row and column in edit mode.
|
|
1196
|
+
* Puts the cell that is specified by the table row and column in edit mode ([see example](slug:editing_incell_grid)).
|
|
1304
1197
|
*
|
|
1305
1198
|
* @param {number} rowIndex - The data row index that will be switched in the edit mode.
|
|
1306
1199
|
* @param {number|string|any} column - The leaf column index, or the field name or the column instance that should be edited.
|
|
@@ -1355,7 +1248,7 @@ export class GridComponent {
|
|
|
1355
1248
|
* Exports the Grid element to a Drawing [Group]({% slug api_kendo-drawing_group %}) by using the `kendo-grid-pdf` component options.
|
|
1356
1249
|
* ([see example]({% slug pdfexport_grid %}#toc-exporting-multiple-grids-to-the-same-pdf)).
|
|
1357
1250
|
*
|
|
1358
|
-
* @return {Promise}
|
|
1251
|
+
* @return {Promise} A promise that will be resolved with the Drawing `Group`.
|
|
1359
1252
|
*/
|
|
1360
1253
|
drawPDF() {
|
|
1361
1254
|
const promise = createPromise();
|
|
@@ -1371,138 +1264,19 @@ export class GridComponent {
|
|
|
1371
1264
|
/**
|
|
1372
1265
|
* Applies the minimum possible width for the specified column,
|
|
1373
1266
|
* so that the whole text fits without wrapping. This method expects the Grid
|
|
1374
|
-
* to be resizable
|
|
1375
|
-
* Makes sense to execute this method only
|
|
1267
|
+
* to be [resizable](slug:resizing_columns_grid). The method must be executed
|
|
1376
1268
|
* after the Grid is already populated with data.
|
|
1377
|
-
*
|
|
1378
|
-
* @example
|
|
1379
|
-
* ```ts
|
|
1380
|
-
* _@Component({
|
|
1381
|
-
* selector: 'my-app',
|
|
1382
|
-
* template: `
|
|
1383
|
-
* <kendo-grid
|
|
1384
|
-
* #grid
|
|
1385
|
-
* [data]="gridData"
|
|
1386
|
-
* [resizable]="true"
|
|
1387
|
-
* style="height: 300px">
|
|
1388
|
-
* <ng-template kendoGridToolbarTemplate>
|
|
1389
|
-
* <button kendoButton (click)="grid.autoFitColumn(groupColumn)">
|
|
1390
|
-
* Auto-fit the group column
|
|
1391
|
-
* </button>
|
|
1392
|
-
* </ng-template>
|
|
1393
|
-
* <kendo-grid-column-group #groupColumn title="Product Info">
|
|
1394
|
-
* <kendo-grid-column
|
|
1395
|
-
* field="ProductID"
|
|
1396
|
-
* [width]="50"
|
|
1397
|
-
* [minResizableWidth]="30"
|
|
1398
|
-
* title="ID">
|
|
1399
|
-
* </kendo-grid-column>
|
|
1400
|
-
*
|
|
1401
|
-
* <kendo-grid-column
|
|
1402
|
-
* field="ProductName"
|
|
1403
|
-
* title="Product Name">
|
|
1404
|
-
* </kendo-grid-column>
|
|
1405
|
-
* </kendo-grid-column-group>
|
|
1406
|
-
*
|
|
1407
|
-
* <kendo-grid-column
|
|
1408
|
-
* field="UnitPrice"
|
|
1409
|
-
* title="Unit Price"
|
|
1410
|
-
* [width]="180"
|
|
1411
|
-
* filter="numeric"
|
|
1412
|
-
* format="{0:c}">
|
|
1413
|
-
* </kendo-grid-column>
|
|
1414
|
-
* </kendo-grid>
|
|
1415
|
-
* `
|
|
1416
|
-
* })
|
|
1417
|
-
* class AppComponent {
|
|
1418
|
-
* public gridData: any[] = products;
|
|
1419
|
-
* }
|
|
1420
|
-
*
|
|
1421
|
-
* const products = [{
|
|
1422
|
-
* "ProductID": 1,
|
|
1423
|
-
* "ProductName": "Chai",
|
|
1424
|
-
* "UnitPrice": 18.0000,
|
|
1425
|
-
* "Discontinued": true
|
|
1426
|
-
* }, {
|
|
1427
|
-
* "ProductID": 2,
|
|
1428
|
-
* "ProductName": "Chang",
|
|
1429
|
-
* "UnitPrice": 19.0000,
|
|
1430
|
-
* "Discontinued": false
|
|
1431
|
-
* }
|
|
1432
|
-
* ];
|
|
1433
|
-
* ```
|
|
1269
|
+
* [See example](slug:resizing_columns_grid#toc-auto-fitting-the-content)
|
|
1434
1270
|
*/
|
|
1435
1271
|
autoFitColumn(column) {
|
|
1436
1272
|
this.columnResizingService.autoFit(column);
|
|
1437
1273
|
}
|
|
1438
1274
|
/**
|
|
1439
1275
|
* Adjusts the width of the specified columns to fit the entire content, including headers, without wrapping.
|
|
1440
|
-
* If no columns are specified, `autoFitColumns` is applied to all columns.
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
-
* @example
|
|
1445
|
-
* ```ts
|
|
1446
|
-
* _@Component({
|
|
1447
|
-
* selector: 'my-app',
|
|
1448
|
-
* template: `
|
|
1449
|
-
* <kendo-grid
|
|
1450
|
-
* #grid
|
|
1451
|
-
* [data]="gridData"
|
|
1452
|
-
* [resizable]="true"
|
|
1453
|
-
* style="height: 300px">
|
|
1454
|
-
* <ng-template kendoGridToolbarTemplate>
|
|
1455
|
-
* <button kendoButton (click)="grid.autoFitColumns([firstColumn, lastColumn])">
|
|
1456
|
-
* Auto-fit the first and last column
|
|
1457
|
-
* </button>
|
|
1458
|
-
* <button kendoButton (click)="grid.autoFitColumns()">
|
|
1459
|
-
* Auto-fit all columns
|
|
1460
|
-
* </button>
|
|
1461
|
-
* </ng-template>
|
|
1462
|
-
* <kendo-grid-column-group title="Product Info">
|
|
1463
|
-
* <kendo-grid-column
|
|
1464
|
-
* #firstColumn
|
|
1465
|
-
* field="ProductID"
|
|
1466
|
-
* [width]="50"
|
|
1467
|
-
* [minResizableWidth]="30"
|
|
1468
|
-
* title="ID">
|
|
1469
|
-
* </kendo-grid-column>
|
|
1470
|
-
*
|
|
1471
|
-
* <kendo-grid-column
|
|
1472
|
-
* field="ProductName"
|
|
1473
|
-
* title="Product Name"
|
|
1474
|
-
* >
|
|
1475
|
-
* </kendo-grid-column>
|
|
1476
|
-
* </kendo-grid-column-group>
|
|
1477
|
-
*
|
|
1478
|
-
* <kendo-grid-column
|
|
1479
|
-
* #lastColumn
|
|
1480
|
-
* field="UnitPrice"
|
|
1481
|
-
* title="Unit Price"
|
|
1482
|
-
* [width]="180"
|
|
1483
|
-
* filter="numeric"
|
|
1484
|
-
* format="{0:c}">
|
|
1485
|
-
* </kendo-grid-column>
|
|
1486
|
-
* </kendo-grid>
|
|
1487
|
-
* `
|
|
1488
|
-
* })
|
|
1489
|
-
* class AppComponent {
|
|
1490
|
-
* public gridData: any[] = products;
|
|
1491
|
-
* }
|
|
1276
|
+
* If no columns are specified, `autoFitColumns` is applied to all columns.The method must be executed
|
|
1277
|
+
* after the Grid is already populated with data.
|
|
1278
|
+
* [See example](slug:resizing_columns_grid#toc-auto-fitting-the-content)
|
|
1492
1279
|
*
|
|
1493
|
-
* const products = [{
|
|
1494
|
-
* "ProductID": 1,
|
|
1495
|
-
* "ProductName": "Chai",
|
|
1496
|
-
* "UnitPrice": 18.0000,
|
|
1497
|
-
* "Discontinued": true
|
|
1498
|
-
* }, {
|
|
1499
|
-
* "ProductID": 2,
|
|
1500
|
-
* "ProductName": "Chang",
|
|
1501
|
-
* "UnitPrice": 19.0000,
|
|
1502
|
-
* "Discontinued": false
|
|
1503
|
-
* }
|
|
1504
|
-
* ];
|
|
1505
|
-
* ```
|
|
1506
1280
|
*/
|
|
1507
1281
|
autoFitColumns(columns = this.columns) {
|
|
1508
1282
|
let cols;
|
|
@@ -1563,10 +1337,10 @@ export class GridComponent {
|
|
|
1563
1337
|
/**
|
|
1564
1338
|
* Focuses the cell with the specified row and column index.
|
|
1565
1339
|
*
|
|
1566
|
-
* The row index is based on the logical structure of the Grid and does not correspond to the data item index
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
1340
|
+
* The row index is based on the logical structure of the Grid and does not correspond to the data item index.
|
|
1341
|
+
* Header rows are included, starting at index 0.
|
|
1342
|
+
* Group headers and footers are included.
|
|
1343
|
+
* The row indexing is absolute and does not change with paging.
|
|
1570
1344
|
*
|
|
1571
1345
|
* If the Grid is configured for scrolling, including virtual scrolling, the scroll position will be updated.
|
|
1572
1346
|
* If the row is not present on the current page, the method will have no effect.
|
|
@@ -1617,67 +1391,6 @@ export class GridComponent {
|
|
|
1617
1391
|
* @param {number} destIndex - The new position of the column.
|
|
1618
1392
|
* @param {ColumnReorderConfig} options - Additional options.
|
|
1619
1393
|
*
|
|
1620
|
-
* @example
|
|
1621
|
-
* ```ts
|
|
1622
|
-
* _@Component({
|
|
1623
|
-
* selector: 'my-app',
|
|
1624
|
-
* template: `
|
|
1625
|
-
* <kendo-grid
|
|
1626
|
-
* #grid
|
|
1627
|
-
* [data]="gridData"
|
|
1628
|
-
* [reorderable]="true"
|
|
1629
|
-
* style="height: 300px">
|
|
1630
|
-
* <ng-template kendoGridToolbarTemplate>
|
|
1631
|
-
* <button kendoButton
|
|
1632
|
-
* (click)="grid.reorderColumn(groupColumn, 2, { before: true })">
|
|
1633
|
-
* Move the group column before the last one.
|
|
1634
|
-
* </button>
|
|
1635
|
-
* </ng-template>
|
|
1636
|
-
* <kendo-grid-column-group #groupColumn title="Product Info">
|
|
1637
|
-
* <kendo-grid-column
|
|
1638
|
-
* field="ProductID"
|
|
1639
|
-
* [width]="50"
|
|
1640
|
-
* title="ID">
|
|
1641
|
-
* </kendo-grid-column>
|
|
1642
|
-
*
|
|
1643
|
-
* <kendo-grid-column
|
|
1644
|
-
* field="ProductName"
|
|
1645
|
-
* title="Product Name">
|
|
1646
|
-
* </kendo-grid-column>
|
|
1647
|
-
* </kendo-grid-column-group>
|
|
1648
|
-
*
|
|
1649
|
-
* <kendo-grid-column
|
|
1650
|
-
* field="UnitPrice"
|
|
1651
|
-
* title="Unit Price"
|
|
1652
|
-
* [width]="180"
|
|
1653
|
-
* format="{0:c}">
|
|
1654
|
-
* </kendo-grid-column>
|
|
1655
|
-
*
|
|
1656
|
-
* <kendo-grid-column
|
|
1657
|
-
* field="Discontinued"
|
|
1658
|
-
* title="Discontinued"
|
|
1659
|
-
* [width]="100">
|
|
1660
|
-
* </kendo-grid-column>
|
|
1661
|
-
* </kendo-grid>
|
|
1662
|
-
* `
|
|
1663
|
-
* })
|
|
1664
|
-
* class AppComponent {
|
|
1665
|
-
* public gridData: any[] = products;
|
|
1666
|
-
* }
|
|
1667
|
-
*
|
|
1668
|
-
* const products = [{
|
|
1669
|
-
* "ProductID": 1,
|
|
1670
|
-
* "ProductName": "Chai",
|
|
1671
|
-
* "UnitPrice": 18.0000,
|
|
1672
|
-
* "Discontinued": true
|
|
1673
|
-
* }, {
|
|
1674
|
-
* "ProductID": 2,
|
|
1675
|
-
* "ProductName": "Chang",
|
|
1676
|
-
* "UnitPrice": 19.0000,
|
|
1677
|
-
* "Discontinued": false
|
|
1678
|
-
* }
|
|
1679
|
-
* ];
|
|
1680
|
-
* ```
|
|
1681
1394
|
*/
|
|
1682
1395
|
reorderColumn(source, destIndex, options = { before: false }) {
|
|
1683
1396
|
const columnsForLevel = sortColumns(this.allColumnsForLevel(source.level));
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
11
|
* Custom component messages override default component messages
|
|
12
|
-
* ([see example](
|
|
12
|
+
* ([see example](slug:globalization_grid#toc-custom-messages)).
|
|
13
13
|
*/
|
|
14
14
|
export class CustomMessagesComponent extends GridMessages {
|
|
15
15
|
constructor(service) {
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-grid',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '12.0.
|
|
12
|
+
publishDate: 1683098077,
|
|
13
|
+
version: '12.0.1-develop.2',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
12
|
import * as i2 from "./pager-context.service";
|
|
13
13
|
/**
|
|
14
|
-
* Displays information about the current page and the total number of records ([see example](
|
|
14
|
+
* Displays information about the current page and the total number of records ([see example](slug:pager_template_grid#toc-using-built-in-pager-components)).
|
|
15
15
|
*/
|
|
16
16
|
export class PagerInfoComponent extends PagerElementComponent {
|
|
17
17
|
constructor(localization, cd, pagerContext) {
|
|
@@ -18,54 +18,7 @@ import * as i5 from "./pager-input.directive";
|
|
|
18
18
|
import * as i6 from "../navigation/focusable.directive";
|
|
19
19
|
import * as i7 from "@progress/kendo-angular-common";
|
|
20
20
|
/**
|
|
21
|
-
* Displays an input element which allows the typing and rendering of page numbers.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts-preview
|
|
25
|
-
*
|
|
26
|
-
* _@Component({
|
|
27
|
-
* selector: 'my-app',
|
|
28
|
-
* template: `
|
|
29
|
-
* <kendo-grid
|
|
30
|
-
* [kendoGridBinding]="gridData"
|
|
31
|
-
* [pageSize]="1"
|
|
32
|
-
* [pageable]="true"
|
|
33
|
-
* >
|
|
34
|
-
* <kendo-grid-column field="ProductID" title="ID" [width]="40">
|
|
35
|
-
* </kendo-grid-column>
|
|
36
|
-
* <kendo-grid-column field="ProductName" title="Name" [width]="250">
|
|
37
|
-
* </kendo-grid-column>
|
|
38
|
-
* <kendo-grid-column field="UnitPrice" title="Price" [width]="80" format="{0:c}">
|
|
39
|
-
* </kendo-grid-column>
|
|
40
|
-
*
|
|
41
|
-
* <ng-template kendoPagerTemplate let-totalPages="totalPages" let-currentPage="currentPage">
|
|
42
|
-
* <kendo-pager-prev-buttons></kendo-pager-prev-buttons>
|
|
43
|
-
* <kendo-pager-numeric-buttons [buttonCount]="10"></kendo-pager-numeric-buttons>
|
|
44
|
-
* <kendo-pager-next-buttons></kendo-pager-next-buttons>
|
|
45
|
-
* <kendo-pager-input></kendo-pager-input>
|
|
46
|
-
* <kendo-pager-info></kendo-pager-info>
|
|
47
|
-
* </ng-template>
|
|
48
|
-
*
|
|
49
|
-
* </kendo-grid>
|
|
50
|
-
* `
|
|
51
|
-
* })
|
|
52
|
-
*
|
|
53
|
-
* class AppComponent {
|
|
54
|
-
* public gridData = [{
|
|
55
|
-
* "ProductID": 1,
|
|
56
|
-
* "ProductName": "Chai",
|
|
57
|
-
* "UnitPrice": 18.0000,
|
|
58
|
-
* "Discontinued": false
|
|
59
|
-
* }, {
|
|
60
|
-
* "ProductID": 2,
|
|
61
|
-
* "ProductName": "Chang",
|
|
62
|
-
* "UnitPrice": 19.0000,
|
|
63
|
-
* "Discontinued": true
|
|
64
|
-
* }
|
|
65
|
-
* ];
|
|
66
|
-
* }
|
|
67
|
-
*
|
|
68
|
-
* ```
|
|
21
|
+
* Displays an input element which allows the typing and rendering of page numbers ([see example](slug:pager_template_grid#toc-using-built-in-pager-components)).
|
|
69
22
|
*/
|
|
70
23
|
export class PagerInputComponent extends PagerElementComponent {
|
|
71
24
|
constructor(localization, pagerContext, zone, navigationService, cd) {
|
|
@@ -15,7 +15,7 @@ import * as i3 from "./../navigation/navigation.service";
|
|
|
15
15
|
import * as i4 from "@progress/kendo-angular-buttons";
|
|
16
16
|
import * as i5 from "../navigation/focusable.directive";
|
|
17
17
|
/**
|
|
18
|
-
* Displays buttons for navigating to the next and to the last page ([see example](
|
|
18
|
+
* Displays buttons for navigating to the next and to the last page ([see example](slug:pager_template_grid#toc-using-built-in-pager-components)).
|
|
19
19
|
*/
|
|
20
20
|
export class PagerNextButtonsComponent extends PagerElementComponent {
|
|
21
21
|
constructor(localization, pagerContext, cd, navigationService) {
|
|
@@ -13,7 +13,7 @@ import * as i3 from "@progress/kendo-angular-buttons";
|
|
|
13
13
|
import * as i4 from "../navigation/focusable.directive";
|
|
14
14
|
import * as i5 from "@angular/common";
|
|
15
15
|
/**
|
|
16
|
-
* Displays numeric buttons to enable navigation between the pages.
|
|
16
|
+
* Displays numeric buttons to enable navigation between the pages ([see example](slug:pager_template_grid#toc-using-built-in-pager-components)).
|
|
17
17
|
*/
|
|
18
18
|
export class PagerNumericButtonsComponent extends PagerElementComponent {
|
|
19
19
|
constructor(localization, cd, pagerContext) {
|