smart-webcomponents-react 14.2.83 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alertwindow/alertwindow.d.ts +5 -5
- package/alertwindow/alertwindow.esm.js +10 -85
- package/alertwindow/alertwindow.umd.js +1134 -1209
- package/array/array.d.ts +5 -5
- package/array/array.esm.js +13 -88
- package/array/array.umd.js +752 -827
- package/barcode/barcode.d.ts +3 -3
- package/barcode/barcode.esm.js +6 -61
- package/barcode/barcode.umd.js +311 -366
- package/button/dropdownbutton.d.ts +2 -2
- package/button/multisplitbutton.d.ts +2 -2
- package/calendar/calendar.d.ts +2 -2
- package/calendar/calendar.esm.js +4 -49
- package/calendar/calendar.umd.js +710 -755
- package/card/cardview.d.ts +1 -1
- package/cardview/cardview.d.ts +1 -1
- package/cardview/cardview.esm.js +2 -37
- package/cardview/cardview.umd.js +515 -550
- package/chart/chart.d.ts +9 -9
- package/chart/chart.esm.js +18 -133
- package/chart/chart.umd.js +822 -937
- package/chart/ganttchart.d.ts +20 -20
- package/combobox/combobox.d.ts +4 -4
- package/combobox/combobox.esm.js +8 -73
- package/combobox/combobox.umd.js +1341 -1406
- package/datetimepicker/datetimepicker.d.ts +1 -1
- package/datetimepicker/datetimepicker.esm.js +2 -37
- package/datetimepicker/datetimepicker.umd.js +826 -861
- package/dialogwindow/dialogwindow.d.ts +5 -5
- package/dialogwindow/dialogwindow.esm.js +10 -85
- package/dialogwindow/dialogwindow.umd.js +1134 -1209
- package/dockinglayout/dockinglayout.d.ts +7 -7
- package/dockinglayout/dockinglayout.esm.js +14 -109
- package/dockinglayout/dockinglayout.umd.js +765 -860
- package/dropdownbutton/dropdownbutton.d.ts +2 -2
- package/dropdownbutton/dropdownbutton.esm.js +4 -49
- package/dropdownbutton/dropdownbutton.umd.js +527 -572
- package/dropdownlist/dropdownlist.d.ts +4 -4
- package/dropdownlist/dropdownlist.esm.js +8 -73
- package/dropdownlist/dropdownlist.umd.js +1275 -1340
- package/editor/editor.d.ts +11 -9
- package/editor/editor.esm.js +14 -109
- package/editor/editor.umd.js +911 -1006
- package/fileupload/fileupload.d.ts +2 -1
- package/filterbuilder/filterbuilder.d.ts +1 -1
- package/filterbuilder/filterbuilder.esm.js +2 -37
- package/filterbuilder/filterbuilder.umd.js +463 -498
- package/filterpanel/filterpanel.d.ts +1 -1
- package/filterpanel/filterpanel.esm.js +2 -37
- package/filterpanel/filterpanel.umd.js +354 -389
- package/form/form.d.ts +1 -1
- package/form/form.esm.js +4 -49
- package/form/form.umd.js +1016 -1061
- package/form/formgroup.d.ts +1 -1
- package/ganttchart/ganttchart.d.ts +20 -20
- package/ganttchart/ganttchart.esm.js +40 -265
- package/ganttchart/ganttchart.umd.js +1666 -1891
- package/gauge/gauge.d.ts +2 -2
- package/gauge/gauge.esm.js +4 -49
- package/gauge/gauge.umd.js +664 -709
- package/grid/grid.d.ts +56 -51
- package/grid/grid.esm.js +96 -460
- package/grid/grid.umd.js +2107 -2471
- package/index.d.ts +45 -3
- package/input/input.d.ts +2 -2
- package/input/input.esm.js +4 -49
- package/input/input.umd.js +505 -550
- package/input/numberinput.d.ts +2 -2
- package/input/phoneinput.d.ts +4 -4
- package/kanban/kanban.d.ts +6 -6
- package/kanban/kanban.esm.js +12 -97
- package/kanban/kanban.umd.js +1334 -1419
- package/layout/dockinglayout.d.ts +7 -7
- package/listbox/listbox.d.ts +5 -5
- package/listbox/listbox.esm.js +10 -85
- package/listbox/listbox.umd.js +1170 -1245
- package/listmenu/listmenu.d.ts +1 -1
- package/listmenu/listmenu.esm.js +2 -37
- package/listmenu/listmenu.umd.js +1005 -1040
- package/menu/listmenu.d.ts +1 -1
- package/menu/menu.d.ts +1 -1
- package/menu/menu.esm.js +2 -37
- package/menu/menu.umd.js +1025 -1060
- package/multilinetextbox/multilinetextbox.d.ts +1 -1
- package/multilinetextbox/multilinetextbox.esm.js +2 -37
- package/multilinetextbox/multilinetextbox.umd.js +907 -942
- package/multilinewindow/multilinewindow.d.ts +5 -5
- package/multilinewindow/multilinewindow.esm.js +10 -85
- package/multilinewindow/multilinewindow.umd.js +1134 -1209
- package/multisplitbutton/multisplitbutton.d.ts +2 -2
- package/multisplitbutton/multisplitbutton.esm.js +4 -49
- package/multisplitbutton/multisplitbutton.umd.js +941 -986
- package/numberinput/numberinput.d.ts +2 -2
- package/numberinput/numberinput.esm.js +4 -49
- package/numberinput/numberinput.umd.js +348 -393
- package/numerictextbox/numerictextbox.d.ts +1 -1
- package/numerictextbox/numerictextbox.esm.js +2 -37
- package/numerictextbox/numerictextbox.umd.js +592 -627
- package/package.json +1 -1
- package/phoneinput/phoneinput.d.ts +4 -4
- package/phoneinput/phoneinput.esm.js +8 -73
- package/phoneinput/phoneinput.umd.js +386 -451
- package/pivottable/pivottable.d.ts +3 -3
- package/pivottable/pivottable.esm.js +6 -61
- package/pivottable/pivottable.umd.js +762 -817
- package/progresswindow/progresswindow.d.ts +5 -5
- package/progresswindow/progresswindow.esm.js +10 -85
- package/progresswindow/progresswindow.umd.js +1134 -1209
- package/promptwindow/promptwindow.d.ts +5 -5
- package/promptwindow/promptwindow.esm.js +10 -85
- package/promptwindow/promptwindow.umd.js +1134 -1209
- package/qrcode/qrcode.d.ts +3 -3
- package/qrcode/qrcode.esm.js +6 -61
- package/qrcode/qrcode.umd.js +333 -388
- package/querybuilder/querybuilder.d.ts +6 -1
- package/querybuilder/querybuilder.esm.js +14 -38
- package/querybuilder/querybuilder.umd.js +446 -470
- package/rating/rating.d.ts +1 -1
- package/rating/rating.esm.js +2 -37
- package/rating/rating.umd.js +261 -296
- package/scheduler/scheduler.d.ts +17 -17
- package/scheduler/scheduler.esm.js +34 -229
- package/scheduler/scheduler.umd.js +1782 -1977
- package/slider/slider.d.ts +2 -2
- package/slider/slider.esm.js +4 -49
- package/slider/slider.umd.js +642 -687
- package/source/modules/smart.accordion.js +1 -1
- package/source/modules/smart.array.js +2 -2
- package/source/modules/smart.barcode.js +1 -1
- package/source/modules/smart.breadcrumb.js +1 -1
- package/source/modules/smart.button.js +1 -1
- package/source/modules/smart.buttongroup.js +1 -1
- package/source/modules/smart.calendar.js +3 -3
- package/source/modules/smart.card.js +1 -1
- package/source/modules/smart.cardview.js +4 -4
- package/source/modules/smart.carousel.js +1 -1
- package/source/modules/smart.chart.js +1 -1
- package/source/modules/smart.checkbox.js +1 -1
- package/source/modules/smart.checkinput.js +2 -2
- package/source/modules/smart.chip.js +1 -1
- package/source/modules/smart.colorinput.js +2 -2
- package/source/modules/smart.colorpanel.js +2 -2
- package/source/modules/smart.colorpicker.js +2 -2
- package/source/modules/smart.combobox.js +2 -2
- package/source/modules/smart.common.js +1 -1
- package/source/modules/smart.countryinput.js +2 -2
- package/source/modules/smart.dateinput.js +3 -3
- package/source/modules/smart.daterangeinput.js +4 -4
- package/source/modules/smart.datetimepicker.js +3 -3
- package/source/modules/smart.dockinglayout.js +1 -1
- package/source/modules/smart.dropdownbutton.js +1 -1
- package/source/modules/smart.dropdownlist.js +2 -2
- package/source/modules/smart.editor.js +5 -5
- package/source/modules/smart.element.js +1 -1
- package/source/modules/smart.fileupload.js +3 -3
- package/source/modules/smart.form.js +2 -2
- package/source/modules/smart.formulaparser.js +1 -1
- package/source/modules/smart.ganttchart.js +5 -5
- package/source/modules/smart.gauge.js +1 -1
- package/source/modules/smart.grid.js +14 -14
- package/source/modules/smart.gridpanel.js +4 -4
- package/source/modules/smart.input.js +2 -2
- package/source/modules/smart.kanban.js +5 -5
- package/source/modules/smart.layout.js +1 -1
- package/source/modules/smart.led.js +1 -1
- package/source/modules/smart.listbox.js +2 -2
- package/source/modules/smart.listmenu.js +1 -1
- package/source/modules/smart.map.js +1 -1
- package/source/modules/smart.maskedtextbox.js +2 -2
- package/source/modules/smart.menu.js +1 -1
- package/source/modules/smart.multicomboinput.js +2 -2
- package/source/modules/smart.multiinput.js +2 -2
- package/source/modules/smart.multilinetextbox.js +2 -2
- package/source/modules/smart.multisplitbutton.js +2 -2
- package/source/modules/smart.numberinput.js +2 -2
- package/source/modules/smart.numerictextbox.js +2 -2
- package/source/modules/smart.pager.js +2 -2
- package/source/modules/smart.passwordinput.js +2 -2
- package/source/modules/smart.passwordtextbox.js +2 -2
- package/source/modules/smart.path.js +1 -1
- package/source/modules/smart.phoneinput.js +2 -2
- package/source/modules/smart.pivottable.js +3 -3
- package/source/modules/smart.progressbar.js +1 -1
- package/source/modules/smart.qrcode.js +1 -1
- package/source/modules/smart.querybuilder.js +5 -5
- package/source/modules/smart.radiobutton.js +1 -1
- package/source/modules/smart.rating.js +1 -1
- package/source/modules/smart.router.js +1 -1
- package/source/modules/smart.scheduler.js +4 -4
- package/source/modules/smart.scrollbar.js +1 -1
- package/source/modules/smart.slider.js +1 -1
- package/source/modules/smart.sortable.js +1 -1
- package/source/modules/smart.splitter.js +1 -1
- package/source/modules/smart.switchbutton.js +1 -1
- package/source/modules/smart.table.js +3 -3
- package/source/modules/smart.tabs.js +1 -1
- package/source/modules/smart.tank.js +1 -1
- package/source/modules/smart.textarea.js +2 -2
- package/source/modules/smart.textbox.js +2 -2
- package/source/modules/smart.timeinput.js +2 -2
- package/source/modules/smart.timepicker.js +1 -1
- package/source/modules/smart.toast.js +1 -1
- package/source/modules/smart.tooltip.js +1 -1
- package/source/modules/smart.tree.js +1 -1
- package/source/modules/smart.validator.js +1 -1
- package/source/modules/smart.window.js +2 -2
- package/source/smart.accordion.js +1 -1
- package/source/smart.ajax.js +1 -1
- package/source/smart.array.js +1 -1
- package/source/smart.barcode.js +1 -1
- package/source/smart.bootstrap.js +1 -1
- package/source/smart.breadcrumb.js +1 -1
- package/source/smart.button.js +1 -1
- package/source/smart.buttongroup.js +1 -1
- package/source/smart.calendar.js +2 -2
- package/source/smart.card.js +1 -1
- package/source/smart.cardview.js +1 -1
- package/source/smart.carousel.js +1 -1
- package/source/smart.chart.annotations.js +1 -1
- package/source/smart.chart.api.js +1 -1
- package/source/smart.chart.core.js +1 -1
- package/source/smart.chart.js +1 -1
- package/source/smart.chart.rangeselector.js +1 -1
- package/source/smart.chart.waterfall.js +1 -1
- package/source/smart.checkbox.js +1 -1
- package/source/smart.checkinput.js +1 -1
- package/source/smart.chip.js +1 -1
- package/source/smart.colorinput.js +1 -1
- package/source/smart.colorpanel.js +1 -1
- package/source/smart.colorpicker.js +1 -1
- package/source/smart.combobox.js +1 -1
- package/source/smart.complex.js +1 -1
- package/source/smart.core.js +1 -1
- package/source/smart.countryinput.js +1 -1
- package/source/smart.data.js +1 -1
- package/source/smart.date.js +1 -1
- package/source/smart.dateformatpanel.js +1 -1
- package/source/smart.dateinput.js +1 -1
- package/source/smart.daterangeinput.js +1 -1
- package/source/smart.datetimepicker.js +1 -1
- package/source/smart.dockinglayout.js +1 -1
- package/source/smart.draw.js +1 -1
- package/source/smart.dropdownbutton.js +1 -1
- package/source/smart.dropdownlist.js +1 -1
- package/source/smart.editor.js +2 -2
- package/source/smart.element.js +1 -1
- package/source/smart.elements.js +17 -17
- package/source/smart.export.js +1 -1
- package/source/smart.fileupload.js +2 -2
- package/source/smart.filter.js +1 -1
- package/source/smart.filterbuilder.js +2 -2
- package/source/smart.filterpanel.js +1 -1
- package/source/smart.form.js +1 -1
- package/source/smart.format.js +1 -1
- package/source/smart.formulaparser.js +1 -1
- package/source/smart.ganttchart.js +2 -2
- package/source/smart.gauge.js +1 -1
- package/source/smart.grid.cell.js +2 -2
- package/source/smart.grid.chart.js +1 -1
- package/source/smart.grid.column.js +1 -1
- package/source/smart.grid.core.js +2 -2
- package/source/smart.grid.dialog.js +2 -2
- package/source/smart.grid.edit.js +2 -2
- package/source/smart.grid.export.js +1 -1
- package/source/smart.grid.filter.js +1 -1
- package/source/smart.grid.group.js +1 -1
- package/source/smart.grid.js +1 -1
- package/source/smart.grid.menu.js +2 -2
- package/source/smart.grid.pager.js +1 -1
- package/source/smart.grid.reorder.js +1 -1
- package/source/smart.grid.resize.js +2 -2
- package/source/smart.grid.row.js +1 -1
- package/source/smart.grid.select.js +2 -2
- package/source/smart.grid.sort.js +1 -1
- package/source/smart.grid.toolbar.js +2 -2
- package/source/smart.grid.tree.js +1 -1
- package/source/smart.grid.view.js +2 -2
- package/source/smart.gridpanel.js +1 -1
- package/source/smart.input.js +2 -2
- package/source/smart.kanban.js +2 -2
- package/source/smart.layout.js +1 -1
- package/source/smart.led.js +1 -1
- package/source/smart.listbox.js +2 -2
- package/source/smart.listmenu.js +1 -1
- package/source/smart.map.js +1 -1
- package/source/smart.maskedtextbox.js +1 -1
- package/source/smart.math.js +1 -1
- package/source/smart.menu.js +1 -1
- package/source/smart.multicomboinput.js +1 -1
- package/source/smart.multiinput.js +1 -1
- package/source/smart.multilinetextbox.js +1 -1
- package/source/smart.multisplitbutton.js +1 -1
- package/source/smart.numberformatpanel.js +1 -1
- package/source/smart.numberinput.js +1 -1
- package/source/smart.numeric.js +1 -1
- package/source/smart.numerictextbox.js +1 -1
- package/source/smart.pager.js +1 -1
- package/source/smart.passwordinput.js +1 -1
- package/source/smart.passwordtextbox.js +1 -1
- package/source/smart.path.js +1 -1
- package/source/smart.phoneinput.js +1 -1
- package/source/smart.pivottable.js +1 -1
- package/source/smart.powerbutton.js +1 -1
- package/source/smart.progressbar.js +1 -1
- package/source/smart.qrcode.js +1 -1
- package/source/smart.radiobutton.js +1 -1
- package/source/smart.rating.js +1 -1
- package/source/smart.router.js +1 -1
- package/source/smart.scheduler.js +1 -1
- package/source/smart.scrollbar.js +1 -1
- package/source/smart.slider.js +1 -1
- package/source/smart.sortable.js +1 -1
- package/source/smart.splitter.js +1 -1
- package/source/smart.switchbutton.js +1 -1
- package/source/smart.table.js +1 -1
- package/source/smart.tabs.js +1 -1
- package/source/smart.tank.js +1 -1
- package/source/smart.textarea.js +1 -1
- package/source/smart.textbox.js +1 -1
- package/source/smart.tickintervalhandler.js +1 -1
- package/source/smart.timeinput.js +1 -1
- package/source/smart.timepicker.js +1 -1
- package/source/smart.toast.js +1 -1
- package/source/smart.tooltip.js +1 -1
- package/source/smart.tree.js +1 -1
- package/source/smart.validationpanel.js +1 -1
- package/source/smart.validator.js +1 -1
- package/source/smart.window.js +1 -1
- package/source/styles/components/smart.grid.css +1 -1
- package/source/styles/default/scss/smart.grid.scss +10 -3
- package/source/styles/default/smart.grid.css +7 -3
- package/source/styles/smart.default.css +1 -1
- package/source/typescript/smart.editor.d.ts +4 -2
- package/source/typescript/smart.elements.d.ts +45 -3
- package/source/typescript/smart.fileupload.d.ts +2 -1
- package/source/typescript/smart.grid.d.ts +34 -0
- package/source/typescript/smart.querybuilder.d.ts +5 -0
- package/splitter/splitter.d.ts +3 -3
- package/splitter/splitter.esm.js +6 -61
- package/splitter/splitter.umd.js +901 -956
- package/table/pivottable.d.ts +3 -3
- package/table/table.d.ts +7 -7
- package/table/table.esm.js +14 -109
- package/table/table.umd.js +1278 -1373
- package/tabs/tabs.d.ts +4 -4
- package/tabs/tabs.esm.js +8 -73
- package/tabs/tabs.umd.js +875 -940
- package/tabs/tabswindow.d.ts +5 -5
- package/tabswindow/tabswindow.d.ts +5 -5
- package/tabswindow/tabswindow.esm.js +10 -85
- package/tabswindow/tabswindow.umd.js +1134 -1209
- package/tank/tank.d.ts +2 -2
- package/tank/tank.esm.js +4 -49
- package/tank/tank.umd.js +598 -643
- package/textbox/multilinetextbox.d.ts +1 -1
- package/textbox/numerictextbox.d.ts +1 -1
- package/timepicker/datetimepicker.d.ts +1 -1
- package/toast/toast.d.ts +1 -1
- package/toast/toast.esm.js +2 -37
- package/toast/toast.umd.js +397 -432
- package/tree/tree.d.ts +4 -4
- package/tree/tree.esm.js +8 -73
- package/tree/tree.umd.js +1310 -1375
- package/waitwindow/waitwindow.d.ts +5 -5
- package/waitwindow/waitwindow.esm.js +10 -85
- package/waitwindow/waitwindow.umd.js +1134 -1209
- package/window/alertwindow.d.ts +5 -5
- package/window/dialogwindow.d.ts +5 -5
- package/window/multilinewindow.d.ts +5 -5
- package/window/progresswindow.d.ts +5 -5
- package/window/promptwindow.d.ts +5 -5
- package/window/tabswindow.d.ts +5 -5
- package/window/waitwindow.d.ts +5 -5
- package/window/window.d.ts +5 -5
- package/window/window.esm.js +10 -85
- package/window/window.umd.js +1134 -1209
package/grid/grid.umd.js
CHANGED
|
@@ -2,2481 +2,2117 @@
|
|
|
2
2
|
require('../source/modules/smart.grid');
|
|
3
3
|
|
|
4
4
|
(function (global, factory) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
6
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
|
|
7
|
+
(factory((global.grid = {}),global.React));
|
|
8
8
|
}(this, (function (exports,React) { 'use strict';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
React = React && React.hasOwnProperty('default') ? React['default'] : React;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
const Smart = window.Smart;
|
|
13
|
+
/**
|
|
14
|
+
Data Grid UI Component that covers everything from paging, sorting, grouping, filtering, and editing to row and column virtualization, right-to-left layout, export to Excel and PDF and Accessibility.
|
|
15
|
+
*/
|
|
16
|
+
class Grid extends React.Component {
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super(props);
|
|
19
|
+
this.componentRef = React.createRef();
|
|
20
|
+
}
|
|
21
|
+
// Gets the id of the React component.
|
|
22
|
+
get id() {
|
|
23
|
+
if (!this._id) {
|
|
24
|
+
this._id = 'Grid' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
25
|
+
}
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
/** An object containing settings related to the grid's appearance.
|
|
29
|
+
* Property type: GridAppearance
|
|
30
|
+
*/
|
|
31
|
+
get appearance() {
|
|
32
|
+
return this.nativeElement ? this.nativeElement.appearance : undefined;
|
|
33
|
+
}
|
|
34
|
+
set appearance(value) {
|
|
35
|
+
if (this.nativeElement) {
|
|
36
|
+
this.nativeElement.appearance = value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/** An object containing settings related to the grid's behavior.
|
|
40
|
+
* Property type: GridBehavior
|
|
41
|
+
*/
|
|
42
|
+
get behavior() {
|
|
43
|
+
return this.nativeElement ? this.nativeElement.behavior : undefined;
|
|
44
|
+
}
|
|
45
|
+
set behavior(value) {
|
|
46
|
+
if (this.nativeElement) {
|
|
47
|
+
this.nativeElement.behavior = value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** An object containing settings related to the grid's layout.
|
|
51
|
+
* Property type: GridLayout
|
|
52
|
+
*/
|
|
53
|
+
get layout() {
|
|
54
|
+
return this.nativeElement ? this.nativeElement.layout : undefined;
|
|
55
|
+
}
|
|
56
|
+
set layout(value) {
|
|
57
|
+
if (this.nativeElement) {
|
|
58
|
+
this.nativeElement.layout = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Sets or gets the language. Used in conjunction with the property messages.
|
|
62
|
+
* Property type: string
|
|
63
|
+
*/
|
|
64
|
+
get locale() {
|
|
65
|
+
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
66
|
+
}
|
|
67
|
+
set locale(value) {
|
|
68
|
+
if (this.nativeElement) {
|
|
69
|
+
this.nativeElement.locale = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** The clipboard property is used to enable/disable clipboard operations with Ctrl+C, Ctrl+X and Ctrl+V keyboard navigations..
|
|
73
|
+
* Property type: GridClipboard
|
|
74
|
+
*/
|
|
75
|
+
get clipboard() {
|
|
76
|
+
return this.nativeElement ? this.nativeElement.clipboard : undefined;
|
|
77
|
+
}
|
|
78
|
+
set clipboard(value) {
|
|
79
|
+
if (this.nativeElement) {
|
|
80
|
+
this.nativeElement.clipboard = value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** The columns property is used to describe all columns displayed in the grid.
|
|
84
|
+
* Property type: {label: string, dataField: string}[] | string[] | number | GridColumn[]
|
|
85
|
+
*/
|
|
86
|
+
get columns() {
|
|
87
|
+
return this.nativeElement ? this.nativeElement.columns : undefined;
|
|
88
|
+
}
|
|
89
|
+
set columns(value) {
|
|
90
|
+
if (this.nativeElement) {
|
|
91
|
+
this.nativeElement.columns = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Context Menu is the drop-down menu displayed after right-clicking a Grid row. It allows you to delete row, edit cell or row depending on the edit mode. The 'contextMenuItemCustom' dataSource option allows you to add custom menu item to the context menu. You can replace the context menu by using the 'selector' property and setting it to ID of a Smart.Menu component.
|
|
95
|
+
* Property type: GridContextMenu
|
|
96
|
+
*/
|
|
97
|
+
get contextMenu() {
|
|
98
|
+
return this.nativeElement ? this.nativeElement.contextMenu : undefined;
|
|
99
|
+
}
|
|
100
|
+
set contextMenu(value) {
|
|
101
|
+
if (this.nativeElement) {
|
|
102
|
+
this.nativeElement.contextMenu = value;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** Column Menu is the drop-down menu displayed after clicking the column header's drop-down button, which is displayed when you hover the column header. It allows you to customize column settings. For example: Sort, Filter or Group the Grid by the current column.
|
|
106
|
+
* Property type: GridColumnMenu
|
|
107
|
+
*/
|
|
108
|
+
get columnMenu() {
|
|
109
|
+
return this.nativeElement ? this.nativeElement.columnMenu : undefined;
|
|
110
|
+
}
|
|
111
|
+
set columnMenu(value) {
|
|
112
|
+
if (this.nativeElement) {
|
|
113
|
+
this.nativeElement.columnMenu = value;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** Describes the settings of the column groups.
|
|
117
|
+
* Property type: GridColumnGroup[]
|
|
118
|
+
*/
|
|
119
|
+
get columnGroups() {
|
|
120
|
+
return this.nativeElement ? this.nativeElement.columnGroups : undefined;
|
|
121
|
+
}
|
|
122
|
+
set columnGroups(value) {
|
|
123
|
+
if (this.nativeElement) {
|
|
124
|
+
this.nativeElement.columnGroups = value;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Sets or gets details about conditional formatting to be applied to the Grid's cells.
|
|
128
|
+
* Property type: GridConditionalFormatting[]
|
|
129
|
+
*/
|
|
130
|
+
get conditionalFormatting() {
|
|
131
|
+
return this.nativeElement ? this.nativeElement.conditionalFormatting : undefined;
|
|
132
|
+
}
|
|
133
|
+
set conditionalFormatting(value) {
|
|
134
|
+
if (this.nativeElement) {
|
|
135
|
+
this.nativeElement.conditionalFormatting = value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Sets the Grid Charting Data Visualization.
|
|
139
|
+
* Property type: GridCharting
|
|
140
|
+
*/
|
|
141
|
+
get charting() {
|
|
142
|
+
return this.nativeElement ? this.nativeElement.charting : undefined;
|
|
143
|
+
}
|
|
144
|
+
set charting(value) {
|
|
145
|
+
if (this.nativeElement) {
|
|
146
|
+
this.nativeElement.charting = value;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/** Sets the TreeGrid checkboxes.
|
|
150
|
+
* Property type: GridCheckBoxes
|
|
151
|
+
*/
|
|
152
|
+
get checkBoxes() {
|
|
153
|
+
return this.nativeElement ? this.nativeElement.checkBoxes : undefined;
|
|
154
|
+
}
|
|
155
|
+
set checkBoxes(value) {
|
|
156
|
+
if (this.nativeElement) {
|
|
157
|
+
this.nativeElement.checkBoxes = value;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** Sets the Grid Data Export options.
|
|
161
|
+
* Property type: GridDataExport
|
|
162
|
+
*/
|
|
163
|
+
get dataExport() {
|
|
164
|
+
return this.nativeElement ? this.nativeElement.dataExport : undefined;
|
|
165
|
+
}
|
|
166
|
+
set dataExport(value) {
|
|
167
|
+
if (this.nativeElement) {
|
|
168
|
+
this.nativeElement.dataExport = value;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/** Sets the grid's data source. The value of dataSource can be an instance of JQX.DataAdapter or an Array.
|
|
172
|
+
* Property type: any
|
|
173
|
+
*/
|
|
174
|
+
get dataSource() {
|
|
175
|
+
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
176
|
+
}
|
|
177
|
+
set dataSource(value) {
|
|
178
|
+
if (this.nativeElement) {
|
|
179
|
+
this.nativeElement.dataSource = value;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** Sets the grid's data source settings when the dataSource property is set to an Array or URL.
|
|
183
|
+
* Property type: GridDataSourceSettings
|
|
184
|
+
*/
|
|
185
|
+
get dataSourceSettings() {
|
|
186
|
+
return this.nativeElement ? this.nativeElement.dataSourceSettings : undefined;
|
|
187
|
+
}
|
|
188
|
+
set dataSourceSettings(value) {
|
|
189
|
+
if (this.nativeElement) {
|
|
190
|
+
this.nativeElement.dataSourceSettings = value;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/** Describes the grid's editing settings.
|
|
194
|
+
* Property type: GridEditing
|
|
195
|
+
*/
|
|
196
|
+
get editing() {
|
|
197
|
+
return this.nativeElement ? this.nativeElement.editing : undefined;
|
|
198
|
+
}
|
|
199
|
+
set editing(value) {
|
|
200
|
+
if (this.nativeElement) {
|
|
201
|
+
this.nativeElement.editing = value;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/** Describes the grid's filtering settings.
|
|
205
|
+
* Property type: GridFiltering
|
|
206
|
+
*/
|
|
207
|
+
get filtering() {
|
|
208
|
+
return this.nativeElement ? this.nativeElement.filtering : undefined;
|
|
209
|
+
}
|
|
210
|
+
set filtering(value) {
|
|
211
|
+
if (this.nativeElement) {
|
|
212
|
+
this.nativeElement.filtering = value;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/** Describes the grid's grouping settings.
|
|
216
|
+
* Property type: GridGrouping
|
|
217
|
+
*/
|
|
218
|
+
get grouping() {
|
|
219
|
+
return this.nativeElement ? this.nativeElement.grouping : undefined;
|
|
220
|
+
}
|
|
221
|
+
set grouping(value) {
|
|
222
|
+
if (this.nativeElement) {
|
|
223
|
+
this.nativeElement.grouping = value;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/** Sets the messages values.
|
|
227
|
+
* Property type: any
|
|
228
|
+
*/
|
|
229
|
+
get messages() {
|
|
230
|
+
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
231
|
+
}
|
|
232
|
+
set messages(value) {
|
|
233
|
+
if (this.nativeElement) {
|
|
234
|
+
this.nativeElement.messages = value;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/** Callback function(chart: JQX.Chart) called when the chart has been initialized. You can use this function to customize the Chart element settings.
|
|
238
|
+
* Property type: {(cell: GridCell): void}
|
|
239
|
+
*/
|
|
240
|
+
get onCellValue() {
|
|
241
|
+
return this.nativeElement ? this.nativeElement.onCellValue : undefined;
|
|
242
|
+
}
|
|
243
|
+
set onCellValue(value) {
|
|
244
|
+
if (this.nativeElement) {
|
|
245
|
+
this.nativeElement.onCellValue = value;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/** Callback function() called when the grid has been rendered.
|
|
249
|
+
* Property type: {(cells: GridCell[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void}
|
|
250
|
+
*/
|
|
251
|
+
get onCellUpdate() {
|
|
252
|
+
return this.nativeElement ? this.nativeElement.onCellUpdate : undefined;
|
|
253
|
+
}
|
|
254
|
+
set onCellUpdate(value) {
|
|
255
|
+
if (this.nativeElement) {
|
|
256
|
+
this.nativeElement.onCellUpdate = value;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/** Callback function() called when the grid has been rendered for first time and bindings are completed. The component is ready.
|
|
260
|
+
* Property type: {(cell: GridCell): void}
|
|
261
|
+
*/
|
|
262
|
+
get onCellRender() {
|
|
263
|
+
return this.nativeElement ? this.nativeElement.onCellRender : undefined;
|
|
264
|
+
}
|
|
265
|
+
set onCellRender(value) {
|
|
266
|
+
if (this.nativeElement) {
|
|
267
|
+
this.nativeElement.onCellRender = value;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/** Sets or gets the rows CSS class rules. Different CSS class names are conditionally applied. Example: rowCSSRules: { 'cell-class-1': settings => settings.data.quantity === 5, 'cell-class-2': settings => settings.data.quantity < 5, 'cell-class-3': settings => settings.data.quantity > 5 }. The settings object contains the following properties: index, data, row, api.
|
|
271
|
+
* Property type: {(): void}
|
|
272
|
+
*/
|
|
273
|
+
get onBeforeInit() {
|
|
274
|
+
return this.nativeElement ? this.nativeElement.onBeforeInit : undefined;
|
|
275
|
+
}
|
|
276
|
+
set onBeforeInit(value) {
|
|
277
|
+
if (this.nativeElement) {
|
|
278
|
+
this.nativeElement.onBeforeInit = value;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/** Sets or gets the id of the current user. Has to correspond to the id of an item from the users property/array. Depending on the current user, different privileges are enabled. If no current user is set, privileges depend on the element's properties.
|
|
282
|
+
* Property type: {(): void}
|
|
283
|
+
*/
|
|
284
|
+
get onInit() {
|
|
285
|
+
return this.nativeElement ? this.nativeElement.onInit : undefined;
|
|
286
|
+
}
|
|
287
|
+
set onInit(value) {
|
|
288
|
+
if (this.nativeElement) {
|
|
289
|
+
this.nativeElement.onInit = value;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/** Sets the grid users. Expects an array with 'id', 'name' and optionally 'color' and 'image' properties.
|
|
293
|
+
* Property type: {(): void}
|
|
294
|
+
*/
|
|
295
|
+
get onAfterInit() {
|
|
296
|
+
return this.nativeElement ? this.nativeElement.onAfterInit : undefined;
|
|
297
|
+
}
|
|
298
|
+
set onAfterInit(value) {
|
|
299
|
+
if (this.nativeElement) {
|
|
300
|
+
this.nativeElement.onAfterInit = value;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/** Sets the grid's image upload settings for the image columns.
|
|
304
|
+
* Property type: any
|
|
305
|
+
*/
|
|
306
|
+
get onChartInit() {
|
|
307
|
+
return this.nativeElement ? this.nativeElement.onChartInit : undefined;
|
|
308
|
+
}
|
|
309
|
+
set onChartInit(value) {
|
|
310
|
+
if (this.nativeElement) {
|
|
311
|
+
this.nativeElement.onChartInit = value;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/** Describes the paging settings.
|
|
315
|
+
* Property type: any
|
|
316
|
+
*/
|
|
317
|
+
get onRender() {
|
|
318
|
+
return this.nativeElement ? this.nativeElement.onRender : undefined;
|
|
319
|
+
}
|
|
320
|
+
set onRender(value) {
|
|
321
|
+
if (this.nativeElement) {
|
|
322
|
+
this.nativeElement.onRender = value;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
/** Describes the pager settings.
|
|
326
|
+
* Property type: any
|
|
327
|
+
*/
|
|
328
|
+
get onLoad() {
|
|
329
|
+
return this.nativeElement ? this.nativeElement.onLoad : undefined;
|
|
330
|
+
}
|
|
331
|
+
set onLoad(value) {
|
|
332
|
+
if (this.nativeElement) {
|
|
333
|
+
this.nativeElement.onLoad = value;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/** Sets the row details.
|
|
337
|
+
* Property type: {(event: KeyboardEvent): void}
|
|
338
|
+
*/
|
|
339
|
+
get onKey() {
|
|
340
|
+
return this.nativeElement ? this.nativeElement.onKey : undefined;
|
|
341
|
+
}
|
|
342
|
+
set onKey(value) {
|
|
343
|
+
if (this.nativeElement) {
|
|
344
|
+
this.nativeElement.onKey = value;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/** Sets the scroll mode settings.
|
|
348
|
+
* Property type: {(index: number, row: GridRow): void}
|
|
349
|
+
*/
|
|
350
|
+
get onRowInit() {
|
|
351
|
+
return this.nativeElement ? this.nativeElement.onRowInit : undefined;
|
|
352
|
+
}
|
|
353
|
+
set onRowInit(value) {
|
|
354
|
+
if (this.nativeElement) {
|
|
355
|
+
this.nativeElement.onRowInit = value;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
/** Describes the column header settings.
|
|
359
|
+
* Property type: {(index: number, row: GridRow, details: HTMLElement): void}
|
|
360
|
+
*/
|
|
361
|
+
get onRowDetailInit() {
|
|
362
|
+
return this.nativeElement ? this.nativeElement.onRowDetailInit : undefined;
|
|
363
|
+
}
|
|
364
|
+
set onRowDetailInit(value) {
|
|
365
|
+
if (this.nativeElement) {
|
|
366
|
+
this.nativeElement.onRowDetailInit = value;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/** Describes the summary row settings.
|
|
370
|
+
* Property type: {(index: number, row: GridRow, details: HTMLElement): void}
|
|
371
|
+
*/
|
|
372
|
+
get onRowDetailUpdated() {
|
|
373
|
+
return this.nativeElement ? this.nativeElement.onRowDetailUpdated : undefined;
|
|
374
|
+
}
|
|
375
|
+
set onRowDetailUpdated(value) {
|
|
376
|
+
if (this.nativeElement) {
|
|
377
|
+
this.nativeElement.onRowDetailUpdated = value;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/** Describes the settings for the group header.
|
|
381
|
+
* Property type: {(index: number, row: GridRow, history: any[]): void}
|
|
382
|
+
*/
|
|
383
|
+
get onRowHistory() {
|
|
384
|
+
return this.nativeElement ? this.nativeElement.onRowHistory : undefined;
|
|
385
|
+
}
|
|
386
|
+
set onRowHistory(value) {
|
|
387
|
+
if (this.nativeElement) {
|
|
388
|
+
this.nativeElement.onRowHistory = value;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
/** Describes the header settings of the grid.
|
|
392
|
+
* Property type: {(index: number, row: GridRow, history: any[]): void}
|
|
393
|
+
*/
|
|
394
|
+
get onRowStyle() {
|
|
395
|
+
return this.nativeElement ? this.nativeElement.onRowStyle : undefined;
|
|
396
|
+
}
|
|
397
|
+
set onRowStyle(value) {
|
|
398
|
+
if (this.nativeElement) {
|
|
399
|
+
this.nativeElement.onRowStyle = value;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
/** Describes the footer settings of the grid.
|
|
403
|
+
* Property type: {(index: number[], row: GridRow[]): void}
|
|
404
|
+
*/
|
|
405
|
+
get onRowInserted() {
|
|
406
|
+
return this.nativeElement ? this.nativeElement.onRowInserted : undefined;
|
|
407
|
+
}
|
|
408
|
+
set onRowInserted(value) {
|
|
409
|
+
if (this.nativeElement) {
|
|
410
|
+
this.nativeElement.onRowInserted = value;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
414
|
+
* Property type: {(indexes: number[], rows: GridRow[]): void}
|
|
415
|
+
*/
|
|
416
|
+
get onRowRemoved() {
|
|
417
|
+
return this.nativeElement ? this.nativeElement.onRowRemoved : undefined;
|
|
418
|
+
}
|
|
419
|
+
set onRowRemoved(value) {
|
|
420
|
+
if (this.nativeElement) {
|
|
421
|
+
this.nativeElement.onRowRemoved = value;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
/** The rows property is used to describe all rows displayed in the grid.
|
|
425
|
+
* Property type: {(index: number[], row: GridRow[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void}
|
|
426
|
+
*/
|
|
427
|
+
get onRowUpdate() {
|
|
428
|
+
return this.nativeElement ? this.nativeElement.onRowUpdate : undefined;
|
|
429
|
+
}
|
|
430
|
+
set onRowUpdate(value) {
|
|
431
|
+
if (this.nativeElement) {
|
|
432
|
+
this.nativeElement.onRowUpdate = value;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
/** Describes the selection settings.
|
|
436
|
+
* Property type: {(index: number[], row: GridRow[]): void}
|
|
437
|
+
*/
|
|
438
|
+
get onRowUpdated() {
|
|
439
|
+
return this.nativeElement ? this.nativeElement.onRowUpdated : undefined;
|
|
440
|
+
}
|
|
441
|
+
set onRowUpdated(value) {
|
|
442
|
+
if (this.nativeElement) {
|
|
443
|
+
this.nativeElement.onRowUpdated = value;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
/** Describes sorting settings.
|
|
447
|
+
* Property type: {(index: number, data: any, row: GridRow[]): void}
|
|
448
|
+
*/
|
|
449
|
+
get onRowClass() {
|
|
450
|
+
return this.nativeElement ? this.nativeElement.onRowClass : undefined;
|
|
451
|
+
}
|
|
452
|
+
set onRowClass(value) {
|
|
453
|
+
if (this.nativeElement) {
|
|
454
|
+
this.nativeElement.onRowClass = value;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/** undefined
|
|
458
|
+
* Property type: {(index: number, dataField: string, cellValue: any, data: any, row: GridRow[]): void}
|
|
459
|
+
*/
|
|
460
|
+
get onCellClass() {
|
|
461
|
+
return this.nativeElement ? this.nativeElement.onCellClass : undefined;
|
|
462
|
+
}
|
|
463
|
+
set onCellClass(value) {
|
|
464
|
+
if (this.nativeElement) {
|
|
465
|
+
this.nativeElement.onCellClass = value;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
/** undefined
|
|
469
|
+
* Property type: {(index: number, column: GridColumn): void}
|
|
470
|
+
*/
|
|
471
|
+
get onColumnInit() {
|
|
472
|
+
return this.nativeElement ? this.nativeElement.onColumnInit : undefined;
|
|
473
|
+
}
|
|
474
|
+
set onColumnInit(value) {
|
|
475
|
+
if (this.nativeElement) {
|
|
476
|
+
this.nativeElement.onColumnInit = value;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
/** undefined
|
|
480
|
+
* Property type: {(index: number, column: GridColumn): void}
|
|
481
|
+
*/
|
|
482
|
+
get onColumnInserted() {
|
|
483
|
+
return this.nativeElement ? this.nativeElement.onColumnInserted : undefined;
|
|
484
|
+
}
|
|
485
|
+
set onColumnInserted(value) {
|
|
486
|
+
if (this.nativeElement) {
|
|
487
|
+
this.nativeElement.onColumnInserted = value;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/** undefined
|
|
491
|
+
* Property type: {(index: number, column: GridColumn): void}
|
|
492
|
+
*/
|
|
493
|
+
get onColumnRemoved() {
|
|
494
|
+
return this.nativeElement ? this.nativeElement.onColumnRemoved : undefined;
|
|
495
|
+
}
|
|
496
|
+
set onColumnRemoved(value) {
|
|
497
|
+
if (this.nativeElement) {
|
|
498
|
+
this.nativeElement.onColumnRemoved = value;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
/** undefined
|
|
502
|
+
* Property type: {(index: number, column: GridColumn): void}
|
|
503
|
+
*/
|
|
504
|
+
get onColumnUpdated() {
|
|
505
|
+
return this.nativeElement ? this.nativeElement.onColumnUpdated : undefined;
|
|
506
|
+
}
|
|
507
|
+
set onColumnUpdated(value) {
|
|
508
|
+
if (this.nativeElement) {
|
|
509
|
+
this.nativeElement.onColumnUpdated = value;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
/** undefined
|
|
513
|
+
* Property type: {(dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void}
|
|
514
|
+
*/
|
|
515
|
+
get onColumnClone() {
|
|
516
|
+
return this.nativeElement ? this.nativeElement.onColumnClone : undefined;
|
|
517
|
+
}
|
|
518
|
+
set onColumnClone(value) {
|
|
519
|
+
if (this.nativeElement) {
|
|
520
|
+
this.nativeElement.onColumnClone = value;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
/** undefined
|
|
524
|
+
* Property type: {(name: string, command: any, details: GridCell, event: Event | KeyboardEvent | PointerEvent, handled: boolean): void}
|
|
525
|
+
*/
|
|
526
|
+
get onCommand() {
|
|
527
|
+
return this.nativeElement ? this.nativeElement.onCommand : undefined;
|
|
528
|
+
}
|
|
529
|
+
set onCommand(value) {
|
|
530
|
+
if (this.nativeElement) {
|
|
531
|
+
this.nativeElement.onCommand = value;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
/** undefined
|
|
535
|
+
* Property type: any
|
|
536
|
+
*/
|
|
537
|
+
get rowCSSRules() {
|
|
538
|
+
return this.nativeElement ? this.nativeElement.rowCSSRules : undefined;
|
|
539
|
+
}
|
|
540
|
+
set rowCSSRules(value) {
|
|
541
|
+
if (this.nativeElement) {
|
|
542
|
+
this.nativeElement.rowCSSRules = value;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
/** undefined
|
|
546
|
+
* Property type: string | number
|
|
547
|
+
*/
|
|
548
|
+
get currentUser() {
|
|
549
|
+
return this.nativeElement ? this.nativeElement.currentUser : undefined;
|
|
550
|
+
}
|
|
551
|
+
set currentUser(value) {
|
|
552
|
+
if (this.nativeElement) {
|
|
553
|
+
this.nativeElement.currentUser = value;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/** undefined
|
|
557
|
+
* Property type: any[]
|
|
558
|
+
*/
|
|
559
|
+
get users() {
|
|
560
|
+
return this.nativeElement ? this.nativeElement.users : undefined;
|
|
561
|
+
}
|
|
562
|
+
set users(value) {
|
|
563
|
+
if (this.nativeElement) {
|
|
564
|
+
this.nativeElement.users = value;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
/** undefined
|
|
568
|
+
* Property type: GridUploadSettings
|
|
569
|
+
*/
|
|
570
|
+
get uploadSettings() {
|
|
571
|
+
return this.nativeElement ? this.nativeElement.uploadSettings : undefined;
|
|
572
|
+
}
|
|
573
|
+
set uploadSettings(value) {
|
|
574
|
+
if (this.nativeElement) {
|
|
575
|
+
this.nativeElement.uploadSettings = value;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
/** undefined
|
|
579
|
+
* Property type: GridPaging
|
|
580
|
+
*/
|
|
581
|
+
get paging() {
|
|
582
|
+
return this.nativeElement ? this.nativeElement.paging : undefined;
|
|
583
|
+
}
|
|
584
|
+
set paging(value) {
|
|
585
|
+
if (this.nativeElement) {
|
|
586
|
+
this.nativeElement.paging = value;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/** undefined
|
|
590
|
+
* Property type: GridPager
|
|
591
|
+
*/
|
|
592
|
+
get pager() {
|
|
593
|
+
return this.nativeElement ? this.nativeElement.pager : undefined;
|
|
594
|
+
}
|
|
595
|
+
set pager(value) {
|
|
596
|
+
if (this.nativeElement) {
|
|
597
|
+
this.nativeElement.pager = value;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
/** undefined
|
|
601
|
+
* Property type: GridRowDetail
|
|
602
|
+
*/
|
|
603
|
+
get rowDetail() {
|
|
604
|
+
return this.nativeElement ? this.nativeElement.rowDetail : undefined;
|
|
605
|
+
}
|
|
606
|
+
set rowDetail(value) {
|
|
607
|
+
if (this.nativeElement) {
|
|
608
|
+
this.nativeElement.rowDetail = value;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/** undefined
|
|
612
|
+
* Property type: Scrolling | string
|
|
613
|
+
*/
|
|
614
|
+
get scrolling() {
|
|
615
|
+
return this.nativeElement ? this.nativeElement.scrolling : undefined;
|
|
616
|
+
}
|
|
617
|
+
set scrolling(value) {
|
|
618
|
+
if (this.nativeElement) {
|
|
619
|
+
this.nativeElement.scrolling = value;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
/** undefined
|
|
623
|
+
* Property type: GridColumnHeader
|
|
624
|
+
*/
|
|
625
|
+
get columnHeader() {
|
|
626
|
+
return this.nativeElement ? this.nativeElement.columnHeader : undefined;
|
|
627
|
+
}
|
|
628
|
+
set columnHeader(value) {
|
|
629
|
+
if (this.nativeElement) {
|
|
630
|
+
this.nativeElement.columnHeader = value;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
/** undefined
|
|
634
|
+
* Property type: GridSummaryRow
|
|
635
|
+
*/
|
|
636
|
+
get summaryRow() {
|
|
637
|
+
return this.nativeElement ? this.nativeElement.summaryRow : undefined;
|
|
638
|
+
}
|
|
639
|
+
set summaryRow(value) {
|
|
640
|
+
if (this.nativeElement) {
|
|
641
|
+
this.nativeElement.summaryRow = value;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
/** undefined
|
|
645
|
+
* Property type: GridGroupHeader
|
|
646
|
+
*/
|
|
647
|
+
get groupHeader() {
|
|
648
|
+
return this.nativeElement ? this.nativeElement.groupHeader : undefined;
|
|
649
|
+
}
|
|
650
|
+
set groupHeader(value) {
|
|
651
|
+
if (this.nativeElement) {
|
|
652
|
+
this.nativeElement.groupHeader = value;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
/** undefined
|
|
656
|
+
* Property type: GridHeader
|
|
657
|
+
*/
|
|
658
|
+
get header() {
|
|
659
|
+
return this.nativeElement ? this.nativeElement.header : undefined;
|
|
660
|
+
}
|
|
661
|
+
set header(value) {
|
|
662
|
+
if (this.nativeElement) {
|
|
663
|
+
this.nativeElement.header = value;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
/** undefined
|
|
667
|
+
* Property type: GridFooter
|
|
668
|
+
*/
|
|
669
|
+
get footer() {
|
|
670
|
+
return this.nativeElement ? this.nativeElement.footer : undefined;
|
|
671
|
+
}
|
|
672
|
+
set footer(value) {
|
|
673
|
+
if (this.nativeElement) {
|
|
674
|
+
this.nativeElement.footer = value;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/** undefined
|
|
678
|
+
* Property type: boolean
|
|
679
|
+
*/
|
|
680
|
+
get rightToLeft() {
|
|
681
|
+
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
682
|
+
}
|
|
683
|
+
set rightToLeft(value) {
|
|
684
|
+
if (this.nativeElement) {
|
|
685
|
+
this.nativeElement.rightToLeft = value;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
/** undefined
|
|
689
|
+
* Property type: GridRow[]
|
|
690
|
+
*/
|
|
691
|
+
get rows() {
|
|
692
|
+
return this.nativeElement ? this.nativeElement.rows : undefined;
|
|
693
|
+
}
|
|
694
|
+
set rows(value) {
|
|
695
|
+
if (this.nativeElement) {
|
|
696
|
+
this.nativeElement.rows = value;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
/** undefined
|
|
700
|
+
* Property type: GridSelection
|
|
701
|
+
*/
|
|
702
|
+
get selection() {
|
|
703
|
+
return this.nativeElement ? this.nativeElement.selection : undefined;
|
|
704
|
+
}
|
|
705
|
+
set selection(value) {
|
|
706
|
+
if (this.nativeElement) {
|
|
707
|
+
this.nativeElement.selection = value;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
/** undefined
|
|
711
|
+
* Property type: GridSorting
|
|
712
|
+
*/
|
|
713
|
+
get sorting() {
|
|
714
|
+
return this.nativeElement ? this.nativeElement.sorting : undefined;
|
|
715
|
+
}
|
|
716
|
+
set sorting(value) {
|
|
717
|
+
if (this.nativeElement) {
|
|
718
|
+
this.nativeElement.sorting = value;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
// Gets the properties of the React component.
|
|
722
|
+
get properties() {
|
|
723
|
+
return ["appearance", "behavior", "layout", "locale", "clipboard", "columns", "contextMenu", "columnMenu", "columnGroups", "conditionalFormatting", "charting", "checkBoxes", "dataExport", "dataSource", "dataSourceSettings", "editing", "filtering", "grouping", "messages", "onCellValue", "onCellUpdate", "onCellRender", "onBeforeInit", "onInit", "onAfterInit", "onChartInit", "onRender", "onLoad", "onKey", "onRowInit", "onRowDetailInit", "onRowDetailUpdated", "onRowHistory", "onRowStyle", "onRowInserted", "onRowRemoved", "onRowUpdate", "onRowUpdated", "onRowClass", "onCellClass", "onColumnInit", "onColumnInserted", "onColumnRemoved", "onColumnUpdated", "onColumnClone", "onCommand", "rowCSSRules", "currentUser", "users", "uploadSettings", "paging", "pager", "rowDetail", "scrolling", "columnHeader", "summaryRow", "groupHeader", "header", "footer", "rightToLeft", "rows", "selection", "sorting"];
|
|
724
|
+
}
|
|
725
|
+
// Gets the events of the React component.
|
|
726
|
+
get eventListeners() {
|
|
727
|
+
return ["onBeginEdit", "onBatchChange", "onBatchCancel", "onChange", "onColumnClick", "onColumnDoubleClick", "onColumnResize", "onColumnDragStart", "onColumnDragging", "onColumnDragEnd", "onColumnReorder", "onCommentAdd", "onCommentRemove", "onContextMenuItemClick", "onRowDragStart", "onRowDragging", "onRowDragEnd", "onRowReorder", "onRowExpand", "onRowCollapse", "onRowClick", "onRowDoubleClick", "onRowResize", "onRowStarred", "onCellClick", "onCellDoubleClick", "onEndEdit", "onFilter", "onGroup", "onOpenColumnDialog", "onCloseColumnDialog", "onResize", "onRowTap", "onCellTap", "onPage", "onSort", "onScrollBottomReached", "onScrollTopReached", "onCreate", "onReady"];
|
|
728
|
+
}
|
|
729
|
+
/** Adds a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
730
|
+
* @param {any} data. row data matching the data source
|
|
731
|
+
* @param {boolean} insertAtBottom?. Determines whether to add the new row to the bottom or top of the collection. The default value is 'true'
|
|
732
|
+
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the new row is added. The callback's argument is the new row.
|
|
733
|
+
*/
|
|
734
|
+
addRow(data, insertAtBottom, callback) {
|
|
735
|
+
if (this.nativeElement.isRendered) {
|
|
736
|
+
this.nativeElement.addRow(data, insertAtBottom, callback);
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
this.nativeElement.whenRendered(() => {
|
|
740
|
+
this.nativeElement.addRow(data, insertAtBottom, callback);
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/** Adds a new row and puts it into edit mode. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
745
|
+
* @param {string} position?. 'near' or 'far'
|
|
746
|
+
* @returns {boolean}
|
|
747
|
+
*/
|
|
748
|
+
addNewRow(position) {
|
|
749
|
+
const result = this.nativeElement.addNewRow(position);
|
|
750
|
+
return result;
|
|
751
|
+
}
|
|
752
|
+
/** Adds a new column.
|
|
753
|
+
* @param {any} column. A Grid column object. See 'columns' property.
|
|
754
|
+
* @returns {boolean}
|
|
755
|
+
*/
|
|
756
|
+
addNewColumn(column) {
|
|
757
|
+
const result = this.nativeElement.addNewColumn(column);
|
|
758
|
+
return result;
|
|
759
|
+
}
|
|
760
|
+
/** Adds a new unbound row to the top or bottom. Unbound rows are not part of the Grid's dataSource. They become part of the dataSource, after an unbound row is edited.
|
|
761
|
+
* @param {number} count. The count of unbound rows.
|
|
762
|
+
* @param {string} position?. 'near' or 'far'
|
|
763
|
+
* @returns {boolean}
|
|
764
|
+
*/
|
|
765
|
+
addUnboundRow(count, position) {
|
|
766
|
+
const result = this.nativeElement.addUnboundRow(count, position);
|
|
767
|
+
return result;
|
|
768
|
+
}
|
|
769
|
+
/** Adds a filter to a column. This method will apply a filter to the Grid data. Example for adding multiple filters to a column: grid.addFilter('lastName', ['CONTAINS "burke"', 'or', 'CONTAINS "peterson"']). Example for adding single filter to a column: grid.addFilter('lastName', 'CONTAINS "burke"'). Example for adding numeric filter: grid.addFilter('quantity', '<= 5')
|
|
770
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
771
|
+
* @param {string} filter. Filter expression like: 'startsWith B'. Example 2: ['contains Andrew or contains Nancy'], Example 3: ['quantity', '<= 3 and >= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
772
|
+
* @param {boolean} refreshFilters?. Set this to false, if you will use multiple 'addFilter' calls. By doing this, you will avoid unnecessary renders.
|
|
773
|
+
*/
|
|
774
|
+
addFilter(dataField, filter, refreshFilters) {
|
|
775
|
+
if (this.nativeElement.isRendered) {
|
|
776
|
+
this.nativeElement.addFilter(dataField, filter, refreshFilters);
|
|
777
|
+
}
|
|
778
|
+
else {
|
|
779
|
+
this.nativeElement.whenRendered(() => {
|
|
780
|
+
this.nativeElement.addFilter(dataField, filter, refreshFilters);
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
/** Groups the Grid by a data field. This method will add a group to the Grid when grouping is enabled.
|
|
785
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
786
|
+
*/
|
|
787
|
+
addGroup(dataField) {
|
|
788
|
+
if (this.nativeElement.isRendered) {
|
|
789
|
+
this.nativeElement.addGroup(dataField);
|
|
790
|
+
}
|
|
791
|
+
else {
|
|
792
|
+
this.nativeElement.whenRendered(() => {
|
|
793
|
+
this.nativeElement.addGroup(dataField);
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
/** Sorts the Grid by a data field. This method will add a sorting to the Grid when sorting is enabled.
|
|
798
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
799
|
+
* @param {string} sortOrder. column's sort order. Use 'asc' or 'desc'.
|
|
800
|
+
*/
|
|
801
|
+
addSort(dataField, sortOrder) {
|
|
802
|
+
if (this.nativeElement.isRendered) {
|
|
803
|
+
this.nativeElement.addSort(dataField, sortOrder);
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
this.nativeElement.whenRendered(() => {
|
|
807
|
+
this.nativeElement.addSort(dataField, sortOrder);
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
/** Auto-sizes grid rows. This method will update the height of all Grid rows.
|
|
812
|
+
*/
|
|
813
|
+
autoSizeRows() {
|
|
814
|
+
if (this.nativeElement.isRendered) {
|
|
815
|
+
this.nativeElement.autoSizeRows();
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
this.nativeElement.whenRendered(() => {
|
|
819
|
+
this.nativeElement.autoSizeRows();
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
/** Auto-sizes grid columns. This method will update the width of all Grid columns.
|
|
824
|
+
*/
|
|
825
|
+
autoSizeColumns() {
|
|
826
|
+
if (this.nativeElement.isRendered) {
|
|
827
|
+
this.nativeElement.autoSizeColumns();
|
|
828
|
+
}
|
|
829
|
+
else {
|
|
830
|
+
this.nativeElement.whenRendered(() => {
|
|
831
|
+
this.nativeElement.autoSizeColumns();
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
/** Auto-sizes grid column. This method will update the width of a Grid column by measuring the cells and column header label width.
|
|
836
|
+
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
837
|
+
*/
|
|
838
|
+
autoSizeColumn(dataField) {
|
|
839
|
+
if (this.nativeElement.isRendered) {
|
|
840
|
+
this.nativeElement.autoSizeColumn(dataField);
|
|
841
|
+
}
|
|
842
|
+
else {
|
|
843
|
+
this.nativeElement.whenRendered(() => {
|
|
844
|
+
this.nativeElement.autoSizeColumn(dataField);
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
/** This method returns true, if all rows in the Grid are selected.
|
|
849
|
+
* @returns {boolean}
|
|
850
|
+
*/
|
|
851
|
+
areAllRowsSelected() {
|
|
852
|
+
const result = this.nativeElement.areAllRowsSelected();
|
|
853
|
+
return result;
|
|
854
|
+
}
|
|
855
|
+
/** Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once.
|
|
856
|
+
*/
|
|
857
|
+
beginUpdate() {
|
|
858
|
+
if (this.nativeElement.isRendered) {
|
|
859
|
+
this.nativeElement.beginUpdate();
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
this.nativeElement.whenRendered(() => {
|
|
863
|
+
this.nativeElement.beginUpdate();
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
/** Begins row, cell or column. This method allows you to programmatically start a cell, row or column editing. After calling it, an editor HTMLElement will be created and displayed in the Grid.
|
|
868
|
+
* @param {string | number} rowId. row bound id
|
|
869
|
+
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
870
|
+
*/
|
|
871
|
+
beginEdit(rowId, dataField) {
|
|
872
|
+
if (this.nativeElement.isRendered) {
|
|
873
|
+
this.nativeElement.beginEdit(rowId, dataField);
|
|
874
|
+
}
|
|
875
|
+
else {
|
|
876
|
+
this.nativeElement.whenRendered(() => {
|
|
877
|
+
this.nativeElement.beginEdit(rowId, dataField);
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
/** Clears all filters. Refreshes the view and updates all filter input components.
|
|
882
|
+
*/
|
|
883
|
+
clearFilter() {
|
|
884
|
+
if (this.nativeElement.isRendered) {
|
|
885
|
+
this.nativeElement.clearFilter();
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
this.nativeElement.whenRendered(() => {
|
|
889
|
+
this.nativeElement.clearFilter();
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
/** Clears all data groups. Refreshes the view and updates the DataGrid component.
|
|
894
|
+
*/
|
|
895
|
+
clearGroups() {
|
|
896
|
+
if (this.nativeElement.isRendered) {
|
|
897
|
+
this.nativeElement.clearGroups();
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
this.nativeElement.whenRendered(() => {
|
|
901
|
+
this.nativeElement.clearGroups();
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
/** Clears all sorting. Refreshes the view and updates the DataGrid component.
|
|
906
|
+
*/
|
|
907
|
+
clearSort() {
|
|
908
|
+
if (this.nativeElement.isRendered) {
|
|
909
|
+
this.nativeElement.clearSort();
|
|
910
|
+
}
|
|
911
|
+
else {
|
|
912
|
+
this.nativeElement.whenRendered(() => {
|
|
913
|
+
this.nativeElement.clearSort();
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
/** Clears the selection that user have made. All row, cell and column selection highlights will be removed.
|
|
918
|
+
*/
|
|
919
|
+
clearSelection() {
|
|
920
|
+
if (this.nativeElement.isRendered) {
|
|
921
|
+
this.nativeElement.clearSelection();
|
|
922
|
+
}
|
|
923
|
+
else {
|
|
924
|
+
this.nativeElement.whenRendered(() => {
|
|
925
|
+
this.nativeElement.clearSelection();
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
/** Cancels the editing. This method closes the cell editor and cancels the changes.
|
|
930
|
+
*/
|
|
931
|
+
cancelEdit() {
|
|
932
|
+
if (this.nativeElement.isRendered) {
|
|
933
|
+
this.nativeElement.cancelEdit();
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
this.nativeElement.whenRendered(() => {
|
|
937
|
+
this.nativeElement.cancelEdit();
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
/** Checks a TreeGrid row. This method updates the row's check-box.
|
|
942
|
+
* @param {string | number} rowId. row bound id
|
|
943
|
+
*/
|
|
944
|
+
checkRow(rowId) {
|
|
945
|
+
if (this.nativeElement.isRendered) {
|
|
946
|
+
this.nativeElement.checkRow(rowId);
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
this.nativeElement.whenRendered(() => {
|
|
950
|
+
this.nativeElement.checkRow(rowId);
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
/** Checks all TreeGrid or Grouping rows. This method updates all check-boxes in the TreeGrid or Grouping rows.
|
|
955
|
+
*/
|
|
956
|
+
checkAllRows() {
|
|
957
|
+
if (this.nativeElement.isRendered) {
|
|
958
|
+
this.nativeElement.checkAllRows();
|
|
959
|
+
}
|
|
960
|
+
else {
|
|
961
|
+
this.nativeElement.whenRendered(() => {
|
|
962
|
+
this.nativeElement.checkAllRows();
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
/** Clears the user selection and empties the data source. The Grid will display 'No Rows' in the view.
|
|
967
|
+
*/
|
|
968
|
+
clearRows() {
|
|
969
|
+
if (this.nativeElement.isRendered) {
|
|
970
|
+
this.nativeElement.clearRows();
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
this.nativeElement.whenRendered(() => {
|
|
974
|
+
this.nativeElement.clearRows();
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
/** Closes the column drop-down menu.
|
|
979
|
+
*/
|
|
980
|
+
closeMenu() {
|
|
981
|
+
if (this.nativeElement.isRendered) {
|
|
982
|
+
this.nativeElement.closeMenu();
|
|
983
|
+
}
|
|
984
|
+
else {
|
|
985
|
+
this.nativeElement.whenRendered(() => {
|
|
986
|
+
this.nativeElement.closeMenu();
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
/** Collapses a TreeGrid or Grouping row.
|
|
991
|
+
* @param {string | number} rowId. row bound id
|
|
992
|
+
*/
|
|
993
|
+
collapseRow(rowId) {
|
|
994
|
+
if (this.nativeElement.isRendered) {
|
|
995
|
+
this.nativeElement.collapseRow(rowId);
|
|
996
|
+
}
|
|
997
|
+
else {
|
|
998
|
+
this.nativeElement.whenRendered(() => {
|
|
999
|
+
this.nativeElement.collapseRow(rowId);
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
/** Collapses all TreeGrid or Grouping rows.
|
|
1004
|
+
*/
|
|
1005
|
+
collapseAllRows() {
|
|
1006
|
+
if (this.nativeElement.isRendered) {
|
|
1007
|
+
this.nativeElement.collapseAllRows();
|
|
1008
|
+
}
|
|
1009
|
+
else {
|
|
1010
|
+
this.nativeElement.whenRendered(() => {
|
|
1011
|
+
this.nativeElement.collapseAllRows();
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
/** Creates a Chart, when charting is enabled.
|
|
1016
|
+
* @param {string} type. Chart's type
|
|
1017
|
+
* @param {any} dataSource?. Chart's data source
|
|
1018
|
+
*/
|
|
1019
|
+
createChart(type, dataSource) {
|
|
1020
|
+
if (this.nativeElement.isRendered) {
|
|
1021
|
+
this.nativeElement.createChart(type, dataSource);
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
this.nativeElement.whenRendered(() => {
|
|
1025
|
+
this.nativeElement.createChart(type, dataSource);
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
/** Delete a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
1030
|
+
* @param {string | number} rowId. row bound id
|
|
1031
|
+
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the row is deleted. The callback's argument is the deleted row.
|
|
1032
|
+
*/
|
|
1033
|
+
deleteRow(rowId, callback) {
|
|
1034
|
+
if (this.nativeElement.isRendered) {
|
|
1035
|
+
this.nativeElement.deleteRow(rowId, callback);
|
|
1036
|
+
}
|
|
1037
|
+
else {
|
|
1038
|
+
this.nativeElement.whenRendered(() => {
|
|
1039
|
+
this.nativeElement.deleteRow(rowId, callback);
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
/** Scrolls to a row or cell. This method scrolls to a row or cell, when scrolling is necessary. If pagination is enabled, it will automatically change the page.
|
|
1044
|
+
* @param {string | number} rowId. row bound id
|
|
1045
|
+
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1046
|
+
* @returns {boolean}
|
|
1047
|
+
*/
|
|
1048
|
+
ensureVisible(rowId, dataField) {
|
|
1049
|
+
const result = this.nativeElement.ensureVisible(rowId, dataField);
|
|
1050
|
+
return result;
|
|
1051
|
+
}
|
|
1052
|
+
/** Ends the editing. This method confirms all changes and closes the opened cell editor(s).
|
|
1053
|
+
*/
|
|
1054
|
+
endEdit() {
|
|
1055
|
+
if (this.nativeElement.isRendered) {
|
|
1056
|
+
this.nativeElement.endEdit();
|
|
1057
|
+
}
|
|
1058
|
+
else {
|
|
1059
|
+
this.nativeElement.whenRendered(() => {
|
|
1060
|
+
this.nativeElement.endEdit();
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
/** Ends the update operation. This method will resume the rendering and will refresh the Grid.
|
|
1065
|
+
* @param {boolean} refresh?. The flag that control the calls of the refresh method.
|
|
1066
|
+
*/
|
|
1067
|
+
endUpdate(refresh) {
|
|
1068
|
+
if (this.nativeElement.isRendered) {
|
|
1069
|
+
this.nativeElement.endUpdate(refresh);
|
|
1070
|
+
}
|
|
1071
|
+
else {
|
|
1072
|
+
this.nativeElement.whenRendered(() => {
|
|
1073
|
+
this.nativeElement.endUpdate(refresh);
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
/** Expands a TreeGrid or Grouping row. For example, if you want to expand the first group, then its second sub grup, then the first sub sub group, you can use: grid.expandRow('0.1.0');
|
|
1078
|
+
* @param {string | number} rowId. row bound id
|
|
1079
|
+
*/
|
|
1080
|
+
expandRow(rowId) {
|
|
1081
|
+
if (this.nativeElement.isRendered) {
|
|
1082
|
+
this.nativeElement.expandRow(rowId);
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
this.nativeElement.whenRendered(() => {
|
|
1086
|
+
this.nativeElement.expandRow(rowId);
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
/** Expands rows to a given group level. For example 'grid.expandRowsToGroupLevel(1);' means that all groups at the root level will be expanded.
|
|
1091
|
+
* @param {number} level. row group level
|
|
1092
|
+
*/
|
|
1093
|
+
expandRowsToGroupLevel(level) {
|
|
1094
|
+
if (this.nativeElement.isRendered) {
|
|
1095
|
+
this.nativeElement.expandRowsToGroupLevel(level);
|
|
1096
|
+
}
|
|
1097
|
+
else {
|
|
1098
|
+
this.nativeElement.whenRendered(() => {
|
|
1099
|
+
this.nativeElement.expandRowsToGroupLevel(level);
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
/** Expands all TreeGrid or Grouping rows.
|
|
1104
|
+
*/
|
|
1105
|
+
expandAllRows() {
|
|
1106
|
+
if (this.nativeElement.isRendered) {
|
|
1107
|
+
this.nativeElement.expandAllRows();
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
this.nativeElement.whenRendered(() => {
|
|
1111
|
+
this.nativeElement.expandAllRows();
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
/** Exports the Grid data to .XLSX, .PDF, .JSON, .XML, .CSV, .TSV, .HTML, .JPEG or .PNG. The method uses the options of the dataExport property.
|
|
1116
|
+
* @param {string} Dataformat. 'xlsx', 'pdf', 'json', 'xml', 'csv', 'tsv', 'html', 'png', 'jpeg'.
|
|
1117
|
+
*/
|
|
1118
|
+
exportData(Dataformat) {
|
|
1119
|
+
if (this.nativeElement.isRendered) {
|
|
1120
|
+
this.nativeElement.exportData(Dataformat);
|
|
1121
|
+
}
|
|
1122
|
+
else {
|
|
1123
|
+
this.nativeElement.whenRendered(() => {
|
|
1124
|
+
this.nativeElement.exportData(Dataformat);
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
/** Finds entries by using a query and returns an array of row ids. Example: const rows = grid.find('nancy'); returns all rows that have 'nancy' value. Example 2: const rows = grid.find('nancy, davolio'); returns all rows that have 'nancy' and 'davolio' values in the same row. Example 3: const rows = grid.find(5, 'quantity', '>'); returns all rows where the value of the 'quantity' field is > 5.
|
|
1129
|
+
* @param {string} query. Search query
|
|
1130
|
+
* @param {string} dataField?. Column data field.
|
|
1131
|
+
* @param {string} condition?. Conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
1132
|
+
* @returns {any[]}
|
|
1133
|
+
*/
|
|
1134
|
+
find(query, dataField, condition) {
|
|
1135
|
+
const result = this.nativeElement.find(query, dataField, condition);
|
|
1136
|
+
return result;
|
|
1137
|
+
}
|
|
1138
|
+
/** Finds entries by using a query and returns an array of cells. Each cell in the array is also an array in this format: [id, dataField, value]. Example: const cells = grid.findCells('nancy'); returns all cells that have 'nancy' value. Example 2: const cells = grid.findCells('nancy, davolio'); returns all cells that have 'nancy' and 'davolio' values.
|
|
1139
|
+
* @param {string} query. Search query. You can enter multiple search strings, by using ','. Example: 'nancy, davolio'
|
|
1140
|
+
* @returns {any[]}
|
|
1141
|
+
*/
|
|
1142
|
+
findCells(query) {
|
|
1143
|
+
const result = this.nativeElement.findCells(query);
|
|
1144
|
+
return result;
|
|
1145
|
+
}
|
|
1146
|
+
/** Navigates to a page, when paging is enabled.
|
|
1147
|
+
* @param {number} index. page index
|
|
1148
|
+
*/
|
|
1149
|
+
goToPage(index) {
|
|
1150
|
+
if (this.nativeElement.isRendered) {
|
|
1151
|
+
this.nativeElement.goToPage(index);
|
|
1152
|
+
}
|
|
1153
|
+
else {
|
|
1154
|
+
this.nativeElement.whenRendered(() => {
|
|
1155
|
+
this.nativeElement.goToPage(index);
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
/** Navigates to the next page, when grid paging is enabled.
|
|
1160
|
+
*/
|
|
1161
|
+
nextPage() {
|
|
1162
|
+
if (this.nativeElement.isRendered) {
|
|
1163
|
+
this.nativeElement.nextPage();
|
|
1164
|
+
}
|
|
1165
|
+
else {
|
|
1166
|
+
this.nativeElement.whenRendered(() => {
|
|
1167
|
+
this.nativeElement.nextPage();
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
/** Navigates to the prev page, when grid paging is enabled.
|
|
1172
|
+
*/
|
|
1173
|
+
prevPage() {
|
|
1174
|
+
if (this.nativeElement.isRendered) {
|
|
1175
|
+
this.nativeElement.prevPage();
|
|
1176
|
+
}
|
|
1177
|
+
else {
|
|
1178
|
+
this.nativeElement.whenRendered(() => {
|
|
1179
|
+
this.nativeElement.prevPage();
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
/** Navigates to the first page, when grid paging is enabled.
|
|
1184
|
+
*/
|
|
1185
|
+
firstPage() {
|
|
1186
|
+
if (this.nativeElement.isRendered) {
|
|
1187
|
+
this.nativeElement.firstPage();
|
|
1188
|
+
}
|
|
1189
|
+
else {
|
|
1190
|
+
this.nativeElement.whenRendered(() => {
|
|
1191
|
+
this.nativeElement.firstPage();
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
/** Navigates to the last page, when grid paging is enabled.
|
|
1196
|
+
*/
|
|
1197
|
+
lastPage() {
|
|
1198
|
+
if (this.nativeElement.isRendered) {
|
|
1199
|
+
this.nativeElement.lastPage();
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
this.nativeElement.whenRendered(() => {
|
|
1203
|
+
this.nativeElement.lastPage();
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
/** Focuses and selects a cell or row. The keyboard navigation starts from the focused cell or row. Any previously applied selection will be cleared after calling this method.
|
|
1208
|
+
* @param {string | number} rowId. row bound id
|
|
1209
|
+
* @param {string} dataField?. column bound data field
|
|
1210
|
+
*/
|
|
1211
|
+
focusAndSelect(rowId, dataField) {
|
|
1212
|
+
if (this.nativeElement.isRendered) {
|
|
1213
|
+
this.nativeElement.focusAndSelect(rowId, dataField);
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
this.nativeElement.whenRendered(() => {
|
|
1217
|
+
this.nativeElement.focusAndSelect(rowId, dataField);
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
/** Iterates through each row in the grid and calls the callback for each row. This is similar to the forEach method on a JavaScript array. This is called for each row, ignoring grouping, filtering or sorting applied in the Grid.
|
|
1222
|
+
* @param {any} rowCallback. Callback function with a row object as parameter. Example: grid.forEachRow((row) => { console.log(row.id) });
|
|
1223
|
+
*/
|
|
1224
|
+
forEachRow(rowCallback) {
|
|
1225
|
+
if (this.nativeElement.isRendered) {
|
|
1226
|
+
this.nativeElement.forEachRow(rowCallback);
|
|
1227
|
+
}
|
|
1228
|
+
else {
|
|
1229
|
+
this.nativeElement.whenRendered(() => {
|
|
1230
|
+
this.nativeElement.forEachRow(rowCallback);
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
/** Similar to forEachRow. Iterates through each row in the grid and calls the callback for each row. This method takes into account filtering and sorting applied to the Grid.
|
|
1235
|
+
* @param {any} rowCallback. Callback function with a row object as parameter. Example: grid.forEachRow((row) => { console.log(row.id) });
|
|
1236
|
+
*/
|
|
1237
|
+
forEachRowAfterFilterAndSort(rowCallback) {
|
|
1238
|
+
if (this.nativeElement.isRendered) {
|
|
1239
|
+
this.nativeElement.forEachRowAfterFilterAndSort(rowCallback);
|
|
1240
|
+
}
|
|
1241
|
+
else {
|
|
1242
|
+
this.nativeElement.whenRendered(() => {
|
|
1243
|
+
this.nativeElement.forEachRowAfterFilterAndSort(rowCallback);
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
/** Gets the maximum position of the vertical scrollbar. You can use this method in combination with the setVerticalScrollValue to apply a new scroll position.
|
|
1248
|
+
* @returns {number}
|
|
1249
|
+
*/
|
|
1250
|
+
getVerticalScrollMax() {
|
|
1251
|
+
const result = this.nativeElement.getVerticalScrollMax();
|
|
1252
|
+
return result;
|
|
1253
|
+
}
|
|
1254
|
+
/** Gets the position of the vertical scrollbar.
|
|
1255
|
+
* @returns {number}
|
|
1256
|
+
*/
|
|
1257
|
+
getVerticalScrollValue() {
|
|
1258
|
+
const result = this.nativeElement.getVerticalScrollValue();
|
|
1259
|
+
return result;
|
|
1260
|
+
}
|
|
1261
|
+
/** Gets the maximum position of the horizontal scrollbar. You can use this method in combination with the setHorizontalScrollValue to apply a new scroll position.
|
|
1262
|
+
* @returns {number}
|
|
1263
|
+
*/
|
|
1264
|
+
getHorizontalScrollMax() {
|
|
1265
|
+
const result = this.nativeElement.getHorizontalScrollMax();
|
|
1266
|
+
return result;
|
|
1267
|
+
}
|
|
1268
|
+
/** Gets the position of the horizontal scrollbar.
|
|
1269
|
+
* @returns {number}
|
|
1270
|
+
*/
|
|
1271
|
+
getHorizontalScrollValue() {
|
|
1272
|
+
const result = this.nativeElement.getHorizontalScrollValue();
|
|
1273
|
+
return result;
|
|
1274
|
+
}
|
|
1275
|
+
/** Gets the columns array. Each item in the array contains the column properties which are dynamically set by the user interaction and the columns initialization data properties such as: 'label', 'dataField', 'dataType', 'visible'.
|
|
1276
|
+
* @returns {any}
|
|
1277
|
+
*/
|
|
1278
|
+
getColumns() {
|
|
1279
|
+
const result = this.nativeElement.getColumns();
|
|
1280
|
+
return result;
|
|
1281
|
+
}
|
|
1282
|
+
/** Gets the editing cell(s), when the grid is editing.
|
|
1283
|
+
* @returns {any[]}
|
|
1284
|
+
*/
|
|
1285
|
+
getEditCells() {
|
|
1286
|
+
const result = this.nativeElement.getEditCells();
|
|
1287
|
+
return result;
|
|
1288
|
+
}
|
|
1289
|
+
/** Gets the groups array.
|
|
1290
|
+
* @returns {any[]}
|
|
1291
|
+
*/
|
|
1292
|
+
getGroups() {
|
|
1293
|
+
const result = this.nativeElement.getGroups();
|
|
1294
|
+
return result;
|
|
1295
|
+
}
|
|
1296
|
+
/** Gets an array of columns with applied sorting. Each member in the array is with column's data field used as a key and 'sortOrder' and 'sortIndex' as a value.
|
|
1297
|
+
* @returns {{[dataField: string]: { sortOrder: string, sortIndex: number }}}
|
|
1298
|
+
*/
|
|
1299
|
+
getSortedColumns() {
|
|
1300
|
+
const result = this.nativeElement.getSortedColumns();
|
|
1301
|
+
return result;
|
|
1302
|
+
}
|
|
1303
|
+
/** Gets the selection.
|
|
1304
|
+
* @returns {any}
|
|
1305
|
+
*/
|
|
1306
|
+
getSelection() {
|
|
1307
|
+
const result = this.nativeElement.getSelection();
|
|
1308
|
+
return result;
|
|
1309
|
+
}
|
|
1310
|
+
/** Gets an Array where each item is an Array of row id and row data. If the Grid is used in virtual mode, the row data parameter is empty object, because the data is loaded on demand.
|
|
1311
|
+
* @returns {any[]}
|
|
1312
|
+
*/
|
|
1313
|
+
getSelectedRows() {
|
|
1314
|
+
const result = this.nativeElement.getSelectedRows();
|
|
1315
|
+
return result;
|
|
1316
|
+
}
|
|
1317
|
+
/** Gets the selected row ids.
|
|
1318
|
+
* @returns {any[]}
|
|
1319
|
+
*/
|
|
1320
|
+
getSelectedRowIds() {
|
|
1321
|
+
const result = this.nativeElement.getSelectedRowIds();
|
|
1322
|
+
return result;
|
|
1323
|
+
}
|
|
1324
|
+
/** Gets the selected row indexes.
|
|
1325
|
+
* @returns {any[]}
|
|
1326
|
+
*/
|
|
1327
|
+
getSelectedRowIndexes() {
|
|
1328
|
+
const result = this.nativeElement.getSelectedRowIndexes();
|
|
1329
|
+
return result;
|
|
1330
|
+
}
|
|
1331
|
+
/** Gets the selected cells. The method returns an array of cell. Each cell is an array with row id, column data field and cell value.
|
|
1332
|
+
* @returns {any[]}
|
|
1333
|
+
*/
|
|
1334
|
+
getSelectedCells() {
|
|
1335
|
+
const result = this.nativeElement.getSelectedCells();
|
|
1336
|
+
return result;
|
|
1337
|
+
}
|
|
1338
|
+
/** Gets an array of columns with applied filters.
|
|
1339
|
+
* @returns {any}
|
|
1340
|
+
*/
|
|
1341
|
+
getFilteredColumns() {
|
|
1342
|
+
const result = this.nativeElement.getFilteredColumns();
|
|
1343
|
+
return result;
|
|
1344
|
+
}
|
|
1345
|
+
/** Gets an array of rows, which are visible and match the applied filter.
|
|
1346
|
+
* @returns {any}
|
|
1347
|
+
*/
|
|
1348
|
+
getVisibleRows() {
|
|
1349
|
+
const result = this.nativeElement.getVisibleRows();
|
|
1350
|
+
return result;
|
|
1351
|
+
}
|
|
1352
|
+
/** Gets the result of the getVisibleRows or the rows hierarchy, when the Grid is in TreeGrid/Grouping mode.
|
|
1353
|
+
* @returns {any}
|
|
1354
|
+
*/
|
|
1355
|
+
getViewRows() {
|
|
1356
|
+
const result = this.nativeElement.getViewRows();
|
|
1357
|
+
return result;
|
|
1358
|
+
}
|
|
1359
|
+
/** Gets a JSON object with the following fields: 'sort', 'filter', 'groups', 'paging', 'selectedCells', 'selectedrows'.
|
|
1360
|
+
* @returns {any}
|
|
1361
|
+
*/
|
|
1362
|
+
getState() {
|
|
1363
|
+
const result = this.nativeElement.getState();
|
|
1364
|
+
return result;
|
|
1365
|
+
}
|
|
1366
|
+
/** Gets the changes from the batch edit.
|
|
1367
|
+
* @returns {{ upDated: [{ id: string, dataField: string, oldValue: Object, newValue: Object }], deleted: [{id: string, data: Object}], added: [{id: string, data: Object}] }}
|
|
1368
|
+
*/
|
|
1369
|
+
getBatchEditChanges() {
|
|
1370
|
+
const result = this.nativeElement.getBatchEditChanges();
|
|
1371
|
+
return result;
|
|
1372
|
+
}
|
|
1373
|
+
/** Gets a value of a cell.
|
|
1374
|
+
* @param {string | number} rowId. row bound id
|
|
1375
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1376
|
+
* @returns {any}
|
|
1377
|
+
*/
|
|
1378
|
+
getCellValue(rowId, dataField) {
|
|
1379
|
+
const result = this.nativeElement.getCellValue(rowId, dataField);
|
|
1380
|
+
return result;
|
|
1381
|
+
}
|
|
1382
|
+
/** Gets a column. Returns a Grid column object.
|
|
1383
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1384
|
+
* @returns {GridColumn}
|
|
1385
|
+
*/
|
|
1386
|
+
getColumn(dataField) {
|
|
1387
|
+
const result = this.nativeElement.getColumn(dataField);
|
|
1388
|
+
return result;
|
|
1389
|
+
}
|
|
1390
|
+
/** Gets a value of a column.
|
|
1391
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1392
|
+
* @param {string} propertyName. The property name.
|
|
1393
|
+
* @returns {any}
|
|
1394
|
+
*/
|
|
1395
|
+
getColumnProperty(dataField, propertyName) {
|
|
1396
|
+
const result = this.nativeElement.getColumnProperty(dataField, propertyName);
|
|
1397
|
+
return result;
|
|
1398
|
+
}
|
|
1399
|
+
/** Gets a value of a row.
|
|
1400
|
+
* @param {string | number} rowId. row bound id
|
|
1401
|
+
* @param {string} propertyName. The property name.
|
|
1402
|
+
* @returns {any}
|
|
1403
|
+
*/
|
|
1404
|
+
getRowProperty(rowId, propertyName) {
|
|
1405
|
+
const result = this.nativeElement.getRowProperty(rowId, propertyName);
|
|
1406
|
+
return result;
|
|
1407
|
+
}
|
|
1408
|
+
/** Gets a row. Returns a Grid row object.
|
|
1409
|
+
* @param {string | number} rowId. row bound id
|
|
1410
|
+
* @returns {GridRow}
|
|
1411
|
+
*/
|
|
1412
|
+
getRow(rowId) {
|
|
1413
|
+
const result = this.nativeElement.getRow(rowId);
|
|
1414
|
+
return result;
|
|
1415
|
+
}
|
|
1416
|
+
/** Gets a row by its index. Returns a Grid row object.
|
|
1417
|
+
* @param {number} rowIndex. row bound index
|
|
1418
|
+
* @returns {GridRow}
|
|
1419
|
+
*/
|
|
1420
|
+
getRowByIndex(rowIndex) {
|
|
1421
|
+
const result = this.nativeElement.getRowByIndex(rowIndex);
|
|
1422
|
+
return result;
|
|
1423
|
+
}
|
|
1424
|
+
/** Gets the Data source data associated to the row.
|
|
1425
|
+
* @param {string | number} rowId. row bound id
|
|
1426
|
+
* @returns {any}
|
|
1427
|
+
*/
|
|
1428
|
+
getRowData(rowId) {
|
|
1429
|
+
const result = this.nativeElement.getRowData(rowId);
|
|
1430
|
+
return result;
|
|
1431
|
+
}
|
|
1432
|
+
/** Gets the Row's id by a row index.
|
|
1433
|
+
* @param {number} rowIndex. row index
|
|
1434
|
+
* @returns {string | number}
|
|
1435
|
+
*/
|
|
1436
|
+
getRowId(rowIndex) {
|
|
1437
|
+
const result = this.nativeElement.getRowId(rowIndex);
|
|
1438
|
+
return result;
|
|
1439
|
+
}
|
|
1440
|
+
/** Gets whether a column's drop-down menu is opened.
|
|
1441
|
+
* @returns {boolean}
|
|
1442
|
+
*/
|
|
1443
|
+
hasMenu() {
|
|
1444
|
+
const result = this.nativeElement.hasMenu();
|
|
1445
|
+
return result;
|
|
1446
|
+
}
|
|
1447
|
+
/** This method returns true, if any rows in the Grid are selected.
|
|
1448
|
+
* @returns {boolean}
|
|
1449
|
+
*/
|
|
1450
|
+
hasSelectedRows() {
|
|
1451
|
+
const result = this.nativeElement.hasSelectedRows();
|
|
1452
|
+
return result;
|
|
1453
|
+
}
|
|
1454
|
+
/** Hides the Details of a Row, when row details are enabled.
|
|
1455
|
+
* @param {string | number} rowId. row bound id
|
|
1456
|
+
*/
|
|
1457
|
+
hideDetail(rowId) {
|
|
1458
|
+
if (this.nativeElement.isRendered) {
|
|
1459
|
+
this.nativeElement.hideDetail(rowId);
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
this.nativeElement.whenRendered(() => {
|
|
1463
|
+
this.nativeElement.hideDetail(rowId);
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
/** Highlights a column. Highlights a Grid column.
|
|
1468
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1469
|
+
*/
|
|
1470
|
+
highlightColumn(dataField) {
|
|
1471
|
+
if (this.nativeElement.isRendered) {
|
|
1472
|
+
this.nativeElement.highlightColumn(dataField);
|
|
1473
|
+
}
|
|
1474
|
+
else {
|
|
1475
|
+
this.nativeElement.whenRendered(() => {
|
|
1476
|
+
this.nativeElement.highlightColumn(dataField);
|
|
1477
|
+
});
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
/** Highlights a cell. Calling the method a second time toggle the highlight state.
|
|
1481
|
+
* @param {string | number} rowId. row bound id
|
|
1482
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1483
|
+
* @param {string} className?. CSS Class Name
|
|
1484
|
+
*/
|
|
1485
|
+
highlightCell(rowId, dataField, className) {
|
|
1486
|
+
if (this.nativeElement.isRendered) {
|
|
1487
|
+
this.nativeElement.highlightCell(rowId, dataField, className);
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
this.nativeElement.whenRendered(() => {
|
|
1491
|
+
this.nativeElement.highlightCell(rowId, dataField, className);
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
/** Highlights a row. Calling the method a second time toggle the highlight state.
|
|
1496
|
+
* @param {string | number} rowId. row bound id
|
|
1497
|
+
* @param {string} className?. CSS Class Name
|
|
1498
|
+
*/
|
|
1499
|
+
highlightRow(rowId, className) {
|
|
1500
|
+
if (this.nativeElement.isRendered) {
|
|
1501
|
+
this.nativeElement.highlightRow(rowId, className);
|
|
1502
|
+
}
|
|
1503
|
+
else {
|
|
1504
|
+
this.nativeElement.whenRendered(() => {
|
|
1505
|
+
this.nativeElement.highlightRow(rowId, className);
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
/** Inserts a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
1510
|
+
* @param {any} data. row data matching the data source
|
|
1511
|
+
* @param {number} index?. Determines the insert index. The default value is the last index.
|
|
1512
|
+
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the new row is added. The callback's argument is the new row.
|
|
1513
|
+
*/
|
|
1514
|
+
insertRow(data, index, callback) {
|
|
1515
|
+
if (this.nativeElement.isRendered) {
|
|
1516
|
+
this.nativeElement.insertRow(data, index, callback);
|
|
1517
|
+
}
|
|
1518
|
+
else {
|
|
1519
|
+
this.nativeElement.whenRendered(() => {
|
|
1520
|
+
this.nativeElement.insertRow(data, index, callback);
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
/** Opens a column drop-down menu.
|
|
1525
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1526
|
+
*/
|
|
1527
|
+
openMenu(dataField) {
|
|
1528
|
+
if (this.nativeElement.isRendered) {
|
|
1529
|
+
this.nativeElement.openMenu(dataField);
|
|
1530
|
+
}
|
|
1531
|
+
else {
|
|
1532
|
+
this.nativeElement.whenRendered(() => {
|
|
1533
|
+
this.nativeElement.openMenu(dataField);
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
/** Opens a context menu. Note that context menu should be enabled.
|
|
1538
|
+
* @param {number} left. Left Position.
|
|
1539
|
+
* @param {number} top. Top Position.
|
|
1540
|
+
*/
|
|
1541
|
+
openContextMenu(left, top) {
|
|
1542
|
+
if (this.nativeElement.isRendered) {
|
|
1543
|
+
this.nativeElement.openContextMenu(left, top);
|
|
1544
|
+
}
|
|
1545
|
+
else {
|
|
1546
|
+
this.nativeElement.whenRendered(() => {
|
|
1547
|
+
this.nativeElement.openContextMenu(left, top);
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
/** Prints the Grid data. The method uses the options of the dataExport property. When printed, the Grid will not display any scrollbars so all rows and columns will be displayed. The grid will auto resize width and height to fit all contents. To customize the printing options, you can use the dataExport property.
|
|
1552
|
+
*/
|
|
1553
|
+
print() {
|
|
1554
|
+
if (this.nativeElement.isRendered) {
|
|
1555
|
+
this.nativeElement.print();
|
|
1556
|
+
}
|
|
1557
|
+
else {
|
|
1558
|
+
this.nativeElement.whenRendered(() => {
|
|
1559
|
+
this.nativeElement.print();
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
/** Renders the grid. This method will make a full-refresh like in the initial Grid creation. It will create Rows, Columns and Cells HTML Elements and then refresh the Grid layout.
|
|
1564
|
+
*/
|
|
1565
|
+
refresh() {
|
|
1566
|
+
if (this.nativeElement.isRendered) {
|
|
1567
|
+
this.nativeElement.refresh();
|
|
1568
|
+
}
|
|
1569
|
+
else {
|
|
1570
|
+
this.nativeElement.whenRendered(() => {
|
|
1571
|
+
this.nativeElement.refresh();
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
/** Refreshes the grid with the current property values. This method will refresh the Grid layout.
|
|
1576
|
+
*/
|
|
1577
|
+
refreshView() {
|
|
1578
|
+
if (this.nativeElement.isRendered) {
|
|
1579
|
+
this.nativeElement.refreshView();
|
|
1580
|
+
}
|
|
1581
|
+
else {
|
|
1582
|
+
this.nativeElement.whenRendered(() => {
|
|
1583
|
+
this.nativeElement.refreshView();
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
/** Refreshes the grid cells in view. The method is useful for live-updates of cell values.
|
|
1588
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1589
|
+
* @param {boolean} refreshFilters?. Set this to false, if you need to make multiple removeFilter calls.
|
|
1590
|
+
*/
|
|
1591
|
+
removeFilter(dataField, refreshFilters) {
|
|
1592
|
+
if (this.nativeElement.isRendered) {
|
|
1593
|
+
this.nativeElement.removeFilter(dataField, refreshFilters);
|
|
1594
|
+
}
|
|
1595
|
+
else {
|
|
1596
|
+
this.nativeElement.whenRendered(() => {
|
|
1597
|
+
this.nativeElement.removeFilter(dataField, refreshFilters);
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
/** Removes a column filter.
|
|
1602
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1603
|
+
*/
|
|
1604
|
+
removeGroup(dataField) {
|
|
1605
|
+
if (this.nativeElement.isRendered) {
|
|
1606
|
+
this.nativeElement.removeGroup(dataField);
|
|
1607
|
+
}
|
|
1608
|
+
else {
|
|
1609
|
+
this.nativeElement.whenRendered(() => {
|
|
1610
|
+
this.nativeElement.removeGroup(dataField);
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
/** Removes a group by data field. This method will remove a group to the Grid when grouping is enabled.
|
|
1615
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1616
|
+
*/
|
|
1617
|
+
removeSort(dataField) {
|
|
1618
|
+
if (this.nativeElement.isRendered) {
|
|
1619
|
+
this.nativeElement.removeSort(dataField);
|
|
1620
|
+
}
|
|
1621
|
+
else {
|
|
1622
|
+
this.nativeElement.whenRendered(() => {
|
|
1623
|
+
this.nativeElement.removeSort(dataField);
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
/** Removes a sorting by data field. This method will remove a sorting from a Grid column.
|
|
1628
|
+
*/
|
|
1629
|
+
refreshSort() {
|
|
1630
|
+
if (this.nativeElement.isRendered) {
|
|
1631
|
+
this.nativeElement.refreshSort();
|
|
1632
|
+
}
|
|
1633
|
+
else {
|
|
1634
|
+
this.nativeElement.whenRendered(() => {
|
|
1635
|
+
this.nativeElement.refreshSort();
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
/** Re-sorts the Grid by using the already applied column sortings and re-renders the Grid.
|
|
1640
|
+
*/
|
|
1641
|
+
revertBatchEdit() {
|
|
1642
|
+
if (this.nativeElement.isRendered) {
|
|
1643
|
+
this.nativeElement.revertBatchEdit();
|
|
1644
|
+
}
|
|
1645
|
+
else {
|
|
1646
|
+
this.nativeElement.whenRendered(() => {
|
|
1647
|
+
this.nativeElement.revertBatchEdit();
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
/** Reverts the batch edit changes. This method cancels all changes made by the end-user.
|
|
1652
|
+
* @param {string | number} dataField. The data field or column index of the first grid column.
|
|
1653
|
+
* @param {string | number} referenceDataField. The data field or column index of the second grid column.
|
|
1654
|
+
* @param {boolean} insertAfter?. Determines whether to insert the first column after the reference column.
|
|
1655
|
+
*/
|
|
1656
|
+
reorderColumns(dataField, referenceDataField, insertAfter) {
|
|
1657
|
+
if (this.nativeElement.isRendered) {
|
|
1658
|
+
this.nativeElement.reorderColumns(dataField, referenceDataField, insertAfter);
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
this.nativeElement.whenRendered(() => {
|
|
1662
|
+
this.nativeElement.reorderColumns(dataField, referenceDataField, insertAfter);
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
/** Reorders two DataGrid columns.
|
|
1667
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1668
|
+
* @param {string | null} sortOrder. column's sort order. Use 'asc', 'desc' or null.
|
|
1669
|
+
*/
|
|
1670
|
+
sortBy(dataField, sortOrder) {
|
|
1671
|
+
if (this.nativeElement.isRendered) {
|
|
1672
|
+
this.nativeElement.sortBy(dataField, sortOrder);
|
|
1673
|
+
}
|
|
1674
|
+
else {
|
|
1675
|
+
this.nativeElement.whenRendered(() => {
|
|
1676
|
+
this.nativeElement.sortBy(dataField, sortOrder);
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
/** Sorts the Grid by a data field. This method will add or remove sorting, when sorting is enabled. To remove the sorting, use 'null' for the sortOrder parameter.
|
|
1681
|
+
* @param {string | number} dataField. The data field or column index of the first grid column.
|
|
1682
|
+
* @param {string | number} referenceDataField. The data field or column index of the second grid column.
|
|
1683
|
+
*/
|
|
1684
|
+
swapColumns(dataField, referenceDataField) {
|
|
1685
|
+
if (this.nativeElement.isRendered) {
|
|
1686
|
+
this.nativeElement.swapColumns(dataField, referenceDataField);
|
|
1687
|
+
}
|
|
1688
|
+
else {
|
|
1689
|
+
this.nativeElement.whenRendered(() => {
|
|
1690
|
+
this.nativeElement.swapColumns(dataField, referenceDataField);
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
/** Swaps two DataGrid columns.
|
|
1695
|
+
*/
|
|
1696
|
+
saveBatchEdit() {
|
|
1697
|
+
if (this.nativeElement.isRendered) {
|
|
1698
|
+
this.nativeElement.saveBatchEdit();
|
|
1699
|
+
}
|
|
1700
|
+
else {
|
|
1701
|
+
this.nativeElement.whenRendered(() => {
|
|
1702
|
+
this.nativeElement.saveBatchEdit();
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
/** Saves the batch edit changes. This method confirms the editing changes made by the end-user.
|
|
1707
|
+
* @param {string | number} rowId. row bound id
|
|
1708
|
+
* @param {string} dataField?. column bound data field
|
|
1709
|
+
*/
|
|
1710
|
+
select(rowId, dataField) {
|
|
1711
|
+
if (this.nativeElement.isRendered) {
|
|
1712
|
+
this.nativeElement.select(rowId, dataField);
|
|
1713
|
+
}
|
|
1714
|
+
else {
|
|
1715
|
+
this.nativeElement.whenRendered(() => {
|
|
1716
|
+
this.nativeElement.select(rowId, dataField);
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
/** Selects a row, cell or column.
|
|
1721
|
+
* @param {string | number} rowId. row bound id
|
|
1722
|
+
* @param {string} dataField. column bound data field
|
|
1723
|
+
* @param {string | number} endRowId. row bound id
|
|
1724
|
+
* @param {string} endDataField. column bound data field
|
|
1725
|
+
*/
|
|
1726
|
+
selectRange(rowId, dataField, endRowId, endDataField) {
|
|
1727
|
+
if (this.nativeElement.isRendered) {
|
|
1728
|
+
this.nativeElement.selectRange(rowId, dataField, endRowId, endDataField);
|
|
1729
|
+
}
|
|
1730
|
+
else {
|
|
1731
|
+
this.nativeElement.whenRendered(() => {
|
|
1732
|
+
this.nativeElement.selectRange(rowId, dataField, endRowId, endDataField);
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
/** Selects a range of rows, cells or columns. The result of the method depends on the selection configuration of the Grid.
|
|
1737
|
+
* @param {string | number} rowId. row bound id
|
|
1738
|
+
* @param {string | number} endRowId. row bound id
|
|
1739
|
+
*/
|
|
1740
|
+
selectRowsRange(rowId, endRowId) {
|
|
1741
|
+
if (this.nativeElement.isRendered) {
|
|
1742
|
+
this.nativeElement.selectRowsRange(rowId, endRowId);
|
|
1743
|
+
}
|
|
1744
|
+
else {
|
|
1745
|
+
this.nativeElement.whenRendered(() => {
|
|
1746
|
+
this.nativeElement.selectRowsRange(rowId, endRowId);
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
/** Selects a range of rows.
|
|
1751
|
+
* @param {(string | number)[]} rowId. Array of row ids
|
|
1752
|
+
*/
|
|
1753
|
+
selectRows(rowId) {
|
|
1754
|
+
if (this.nativeElement.isRendered) {
|
|
1755
|
+
this.nativeElement.selectRows(rowId);
|
|
1756
|
+
}
|
|
1757
|
+
else {
|
|
1758
|
+
this.nativeElement.whenRendered(() => {
|
|
1759
|
+
this.nativeElement.selectRows(rowId);
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
/** Selects multiple rows by their ids.
|
|
1764
|
+
*/
|
|
1765
|
+
selectAllRows() {
|
|
1766
|
+
if (this.nativeElement.isRendered) {
|
|
1767
|
+
this.nativeElement.selectAllRows();
|
|
1768
|
+
}
|
|
1769
|
+
else {
|
|
1770
|
+
this.nativeElement.whenRendered(() => {
|
|
1771
|
+
this.nativeElement.selectAllRows();
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
/** Selects all rows.
|
|
1776
|
+
* @param {number[]} rowIndex. Array of row indexes
|
|
1777
|
+
*/
|
|
1778
|
+
selectRowsByIndex(rowIndex) {
|
|
1779
|
+
if (this.nativeElement.isRendered) {
|
|
1780
|
+
this.nativeElement.selectRowsByIndex(rowIndex);
|
|
1781
|
+
}
|
|
1782
|
+
else {
|
|
1783
|
+
this.nativeElement.whenRendered(() => {
|
|
1784
|
+
this.nativeElement.selectRowsByIndex(rowIndex);
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
/** Selects multiple rows by their index.
|
|
1789
|
+
* @param {string} query. Search query
|
|
1790
|
+
* @param {string} dataField?. Column data field.
|
|
1791
|
+
* @param {string} condition?. Conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
1792
|
+
*/
|
|
1793
|
+
selectRowsByQuery(query, dataField, condition) {
|
|
1794
|
+
if (this.nativeElement.isRendered) {
|
|
1795
|
+
this.nativeElement.selectRowsByQuery(query, dataField, condition);
|
|
1796
|
+
}
|
|
1797
|
+
else {
|
|
1798
|
+
this.nativeElement.whenRendered(() => {
|
|
1799
|
+
this.nativeElement.selectRowsByQuery(query, dataField, condition);
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
/** Selects rows by using a query. Example: grid.selectRowsByQuery('nancy'); selects all rows that have 'nancy' value. Example 2: grid.selectRowsByQuery('nancy, davolio'); selects all rows that have 'nancy' and 'davolio' values in the same row. Example 3: grid.selectRowsByQuery(5, 'quantity', '>'); selects all rows where the value of the 'quantity' field is > 5.
|
|
1804
|
+
* @param {(string | number)[]} rowIds. Array of row ids
|
|
1805
|
+
* @param {string[]} dataFields. Array of data fields.
|
|
1806
|
+
*/
|
|
1807
|
+
selectCells(rowIds, dataFields) {
|
|
1808
|
+
if (this.nativeElement.isRendered) {
|
|
1809
|
+
this.nativeElement.selectCells(rowIds, dataFields);
|
|
1810
|
+
}
|
|
1811
|
+
else {
|
|
1812
|
+
this.nativeElement.whenRendered(() => {
|
|
1813
|
+
this.nativeElement.selectCells(rowIds, dataFields);
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
/** Selects multiple cells by their ids and dataFields. Example: grid.selectCells([0, 1, 2], ['firstName', 'quantity', 'date']); - selects the 'firstName', 'quantity' and 'date' cells from the first, second and third rows.
|
|
1818
|
+
* @param {string} query. Search query
|
|
1819
|
+
*/
|
|
1820
|
+
selectCellsByQuery(query) {
|
|
1821
|
+
if (this.nativeElement.isRendered) {
|
|
1822
|
+
this.nativeElement.selectCellsByQuery(query);
|
|
1823
|
+
}
|
|
1824
|
+
else {
|
|
1825
|
+
this.nativeElement.whenRendered(() => {
|
|
1826
|
+
this.nativeElement.selectCellsByQuery(query);
|
|
1827
|
+
});
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
/** Selects cells by using a query. Example: grid.selectCellsByQuery('nancy'); selects all cells that have 'nancy' value. Example 2: grid.selectCellsByQuery('nancy, davolio'); selects all cells that have 'nancy' and 'davolio' values in the same row.
|
|
1831
|
+
* @param {string | number} rowId. row bound id
|
|
1832
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1833
|
+
* @param {string | number | Date | boolean} value. New Cell value.
|
|
1834
|
+
*/
|
|
1835
|
+
setCellValue(rowId, dataField, value) {
|
|
1836
|
+
if (this.nativeElement.isRendered) {
|
|
1837
|
+
this.nativeElement.setCellValue(rowId, dataField, value);
|
|
1838
|
+
}
|
|
1839
|
+
else {
|
|
1840
|
+
this.nativeElement.whenRendered(() => {
|
|
1841
|
+
this.nativeElement.setCellValue(rowId, dataField, value);
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
/** Sets a new value to a cell.
|
|
1846
|
+
* @param {GridColumn[]} columns. Columns array.
|
|
1847
|
+
*/
|
|
1848
|
+
setColumns(columns) {
|
|
1849
|
+
if (this.nativeElement.isRendered) {
|
|
1850
|
+
this.nativeElement.setColumns(columns);
|
|
1851
|
+
}
|
|
1852
|
+
else {
|
|
1853
|
+
this.nativeElement.whenRendered(() => {
|
|
1854
|
+
this.nativeElement.setColumns(columns);
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
/** Sets new columns to the Grid. The grid will redraw all the column headers, and then redraw all of the rows. By using 'setColumns', the grid will compare the new columns passed as argument to the method with existing columns. The Grid will automatically create new columns, keep old columns if they already exist and remove columns which are not in the 'setColumns' method argument. The benefit of that is that the state of the column like(sort, filter, width or other) will be kept, if the column exsits after the new columns are applied.
|
|
1859
|
+
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1860
|
+
* @param {string} propertyName. The column property's name.
|
|
1861
|
+
* @param {any} value. The new property value.
|
|
1862
|
+
*/
|
|
1863
|
+
setColumnProperty(dataField, propertyName, value) {
|
|
1864
|
+
if (this.nativeElement.isRendered) {
|
|
1865
|
+
this.nativeElement.setColumnProperty(dataField, propertyName, value);
|
|
1866
|
+
}
|
|
1867
|
+
else {
|
|
1868
|
+
this.nativeElement.whenRendered(() => {
|
|
1869
|
+
this.nativeElement.setColumnProperty(dataField, propertyName, value);
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
/** Sets a property to a column.
|
|
1874
|
+
* @param {string | number} rowId. row bound id
|
|
1875
|
+
* @param {string} propertyName. The row property's name.
|
|
1876
|
+
* @param {any} value. The new property value.
|
|
1877
|
+
*/
|
|
1878
|
+
setRowProperty(rowId, propertyName, value) {
|
|
1879
|
+
if (this.nativeElement.isRendered) {
|
|
1880
|
+
this.nativeElement.setRowProperty(rowId, propertyName, value);
|
|
1881
|
+
}
|
|
1882
|
+
else {
|
|
1883
|
+
this.nativeElement.whenRendered(() => {
|
|
1884
|
+
this.nativeElement.setRowProperty(rowId, propertyName, value);
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
/** Sets a property to a row.
|
|
1889
|
+
* @param {string | number} rowId. row bound id
|
|
1890
|
+
* @param {{background?: string, color?: string, fontSize?: string, fontFamily?: string, textDecoration?: string, fontStyle?: string, fontWeight?: string}} rowStyle. The row style object. The object may have one or all of the following properties: 'background', 'color', 'fontSize', 'fontFamily', 'textDecoration', 'fontStyle', 'fontWeight'.
|
|
1891
|
+
*/
|
|
1892
|
+
setRowStyle(rowId, rowStyle) {
|
|
1893
|
+
if (this.nativeElement.isRendered) {
|
|
1894
|
+
this.nativeElement.setRowStyle(rowId, rowStyle);
|
|
1895
|
+
}
|
|
1896
|
+
else {
|
|
1897
|
+
this.nativeElement.whenRendered(() => {
|
|
1898
|
+
this.nativeElement.setRowStyle(rowId, rowStyle);
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
/** Sets a style to a row.
|
|
1903
|
+
* @param {string | number} rowId. row bound id
|
|
1904
|
+
* @param {string} dataField. Column bound field name.
|
|
1905
|
+
* @param {{background?: string, color?: string, fontSize?: string, fontFamily?: string, textDecoration?: string, fontStyle?: string, fontWeight?: string}} rowStyle. The cell style object. The object may have one or all of the following properties: 'background', 'color', 'fontSize', 'fontFamily', 'textDecoration', 'fontStyle', 'fontWeight'.
|
|
1906
|
+
*/
|
|
1907
|
+
setCellStyle(rowId, dataField, rowStyle) {
|
|
1908
|
+
if (this.nativeElement.isRendered) {
|
|
1909
|
+
this.nativeElement.setCellStyle(rowId, dataField, rowStyle);
|
|
1910
|
+
}
|
|
1911
|
+
else {
|
|
1912
|
+
this.nativeElement.whenRendered(() => {
|
|
1913
|
+
this.nativeElement.setCellStyle(rowId, dataField, rowStyle);
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
/** Sets a style to a row.
|
|
1918
|
+
* @param {number} value. The new scroll position
|
|
1919
|
+
*/
|
|
1920
|
+
setVerticalScrollValue(value) {
|
|
1921
|
+
if (this.nativeElement.isRendered) {
|
|
1922
|
+
this.nativeElement.setVerticalScrollValue(value);
|
|
1923
|
+
}
|
|
1924
|
+
else {
|
|
1925
|
+
this.nativeElement.whenRendered(() => {
|
|
1926
|
+
this.nativeElement.setVerticalScrollValue(value);
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
/** Sets the position of the vertical scrollbar. You can use this method in combination with the getVerticalScrollValue and getVerticalScrollMax.
|
|
1931
|
+
* @param {number} value. The new scroll position
|
|
1932
|
+
*/
|
|
1933
|
+
setHorizontalScrollValue(value) {
|
|
1934
|
+
if (this.nativeElement.isRendered) {
|
|
1935
|
+
this.nativeElement.setHorizontalScrollValue(value);
|
|
1936
|
+
}
|
|
1937
|
+
else {
|
|
1938
|
+
this.nativeElement.whenRendered(() => {
|
|
1939
|
+
this.nativeElement.setHorizontalScrollValue(value);
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
/** Sets the position of the horizontal scrollbar. You can use this method in combination with the getHorizontalScrollValue and getHorizontalScrollMax.
|
|
1944
|
+
* @param {string | number} rowId. row bound id
|
|
1945
|
+
*/
|
|
1946
|
+
showDetail(rowId) {
|
|
1947
|
+
if (this.nativeElement.isRendered) {
|
|
1948
|
+
this.nativeElement.showDetail(rowId);
|
|
1949
|
+
}
|
|
1950
|
+
else {
|
|
1951
|
+
this.nativeElement.whenRendered(() => {
|
|
1952
|
+
this.nativeElement.showDetail(rowId);
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
/** Shows the Details of a Row, when row details are enabled.
|
|
1957
|
+
* @param {string | number} rowId. row bound id
|
|
1958
|
+
* @param {any} data. row data matching the data source
|
|
1959
|
+
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the row is updated. The callback's argument is the updated row.
|
|
1960
|
+
*/
|
|
1961
|
+
updateRow(rowId, data, callback) {
|
|
1962
|
+
if (this.nativeElement.isRendered) {
|
|
1963
|
+
this.nativeElement.updateRow(rowId, data, callback);
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
this.nativeElement.whenRendered(() => {
|
|
1967
|
+
this.nativeElement.updateRow(rowId, data, callback);
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
/** Updates a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
1972
|
+
* @param {string | number} rowId. row bound id
|
|
1973
|
+
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1974
|
+
*/
|
|
1975
|
+
unselect(rowId, dataField) {
|
|
1976
|
+
if (this.nativeElement.isRendered) {
|
|
1977
|
+
this.nativeElement.unselect(rowId, dataField);
|
|
1978
|
+
}
|
|
1979
|
+
else {
|
|
1980
|
+
this.nativeElement.whenRendered(() => {
|
|
1981
|
+
this.nativeElement.unselect(rowId, dataField);
|
|
1982
|
+
});
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
/** Unselects a row, cell or column.
|
|
1986
|
+
* @param {string | number} rowId. row bound id
|
|
1987
|
+
*/
|
|
1988
|
+
uncheckRow(rowId) {
|
|
1989
|
+
if (this.nativeElement.isRendered) {
|
|
1990
|
+
this.nativeElement.uncheckRow(rowId);
|
|
1991
|
+
}
|
|
1992
|
+
else {
|
|
1993
|
+
this.nativeElement.whenRendered(() => {
|
|
1994
|
+
this.nativeElement.uncheckRow(rowId);
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
/** Unchecks a TreeGrid row. Sets its check-box to false.
|
|
1999
|
+
*/
|
|
2000
|
+
uncheckAllRows() {
|
|
2001
|
+
if (this.nativeElement.isRendered) {
|
|
2002
|
+
this.nativeElement.uncheckAllRows();
|
|
2003
|
+
}
|
|
2004
|
+
else {
|
|
2005
|
+
this.nativeElement.whenRendered(() => {
|
|
2006
|
+
this.nativeElement.uncheckAllRows();
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
/** Unchecks all TreeGrid or Grouping rows. Sets all check-boxes to false.
|
|
2011
|
+
* @param {string | number} rowId. row bound id
|
|
2012
|
+
*/
|
|
2013
|
+
toggleRow(rowId) {
|
|
2014
|
+
if (this.nativeElement.isRendered) {
|
|
2015
|
+
this.nativeElement.toggleRow(rowId);
|
|
2016
|
+
}
|
|
2017
|
+
else {
|
|
2018
|
+
this.nativeElement.whenRendered(() => {
|
|
2019
|
+
this.nativeElement.toggleRow(rowId);
|
|
2020
|
+
});
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
componentDidRender(initialize) {
|
|
2024
|
+
const that = this;
|
|
2025
|
+
const props = {};
|
|
2026
|
+
const events = {};
|
|
2027
|
+
let styles = null;
|
|
2028
|
+
for (let prop in that.props) {
|
|
2029
|
+
if (prop === 'children') {
|
|
2030
|
+
continue;
|
|
2031
|
+
}
|
|
2032
|
+
if (prop === 'style') {
|
|
2033
|
+
styles = that.props[prop];
|
|
2034
|
+
continue;
|
|
2035
|
+
}
|
|
2036
|
+
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
2037
|
+
events[prop] = that.props[prop];
|
|
2038
|
+
continue;
|
|
2039
|
+
}
|
|
2040
|
+
props[prop] = that.props[prop];
|
|
2041
|
+
}
|
|
2042
|
+
if (initialize) {
|
|
2043
|
+
that.nativeElement = this.componentRef.current;
|
|
2044
|
+
}
|
|
2045
|
+
for (let prop in props) {
|
|
2046
|
+
if (prop === 'class' || prop === 'className') {
|
|
2047
|
+
const classNames = props[prop].trim().split(' ');
|
|
2048
|
+
for (let className in classNames) {
|
|
2049
|
+
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
2050
|
+
that.nativeElement.classList.add(classNames[className]);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
continue;
|
|
2054
|
+
}
|
|
2055
|
+
if (props[prop] !== that.nativeElement[prop]) {
|
|
2056
|
+
const normalizeProp = (str) => {
|
|
2057
|
+
return str.replace(/-([a-z])/g, function (g) {
|
|
2058
|
+
return g[1].toUpperCase();
|
|
2059
|
+
});
|
|
2060
|
+
};
|
|
2061
|
+
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
2062
|
+
that.nativeElement.setAttribute(prop, '');
|
|
2063
|
+
}
|
|
2064
|
+
const normalizedProp = normalizeProp(prop);
|
|
2065
|
+
that.nativeElement[normalizedProp] = props[prop];
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
for (let eventName in events) {
|
|
2069
|
+
that[eventName] = events[eventName];
|
|
2070
|
+
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
2071
|
+
}
|
|
2072
|
+
if (initialize) {
|
|
2073
|
+
Smart.Render();
|
|
2074
|
+
if (that.onCreate) {
|
|
2075
|
+
that.onCreate();
|
|
2076
|
+
}
|
|
2077
|
+
that.nativeElement.whenRendered(() => {
|
|
2078
|
+
if (that.onReady) {
|
|
2079
|
+
that.onReady();
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2083
|
+
// setup styles.
|
|
2084
|
+
if (styles) {
|
|
2085
|
+
for (let styleName in styles) {
|
|
2086
|
+
that.nativeElement.style[styleName] = styles[styleName];
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
componentDidMount() {
|
|
2091
|
+
this.componentDidRender(true);
|
|
2092
|
+
}
|
|
2093
|
+
componentDidUpdate() {
|
|
2094
|
+
this.componentDidRender(false);
|
|
2095
|
+
}
|
|
2096
|
+
componentWillUnmount() {
|
|
2097
|
+
const that = this;
|
|
2098
|
+
if (!that.nativeElement) {
|
|
2099
|
+
return;
|
|
2100
|
+
}
|
|
2101
|
+
that.nativeElement.whenRenderedCallbacks = [];
|
|
2102
|
+
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
2103
|
+
const eventName = that.eventListeners[i];
|
|
2104
|
+
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
render() {
|
|
2108
|
+
return (React.createElement("smart-grid", { ref: this.componentRef }, this.props.children));
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
36
2111
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
class Grid extends React.Component {
|
|
42
|
-
constructor(props) {
|
|
43
|
-
super(props);
|
|
44
|
-
this.componentRef = React.createRef();
|
|
45
|
-
}
|
|
46
|
-
// Gets the id of the React component.
|
|
47
|
-
get id() {
|
|
48
|
-
if (!this._id) {
|
|
49
|
-
this._id = 'Grid' + Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
50
|
-
}
|
|
51
|
-
return this._id;
|
|
52
|
-
}
|
|
53
|
-
/** An object containing settings related to the grid's appearance.
|
|
54
|
-
* Property type: GridAppearance
|
|
55
|
-
*/
|
|
56
|
-
get appearance() {
|
|
57
|
-
return this.nativeElement ? this.nativeElement.appearance : undefined;
|
|
58
|
-
}
|
|
59
|
-
set appearance(value) {
|
|
60
|
-
if (this.nativeElement) {
|
|
61
|
-
this.nativeElement.appearance = value;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/** An object containing settings related to the grid's behavior.
|
|
65
|
-
* Property type: GridBehavior
|
|
66
|
-
*/
|
|
67
|
-
get behavior() {
|
|
68
|
-
return this.nativeElement ? this.nativeElement.behavior : undefined;
|
|
69
|
-
}
|
|
70
|
-
set behavior(value) {
|
|
71
|
-
if (this.nativeElement) {
|
|
72
|
-
this.nativeElement.behavior = value;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** An object containing settings related to the grid's layout.
|
|
76
|
-
* Property type: GridLayout
|
|
77
|
-
*/
|
|
78
|
-
get layout() {
|
|
79
|
-
return this.nativeElement ? this.nativeElement.layout : undefined;
|
|
80
|
-
}
|
|
81
|
-
set layout(value) {
|
|
82
|
-
if (this.nativeElement) {
|
|
83
|
-
this.nativeElement.layout = value;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/** Sets or gets the language. Used in conjunction with the property messages.
|
|
87
|
-
* Property type: string
|
|
88
|
-
*/
|
|
89
|
-
get locale() {
|
|
90
|
-
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
91
|
-
}
|
|
92
|
-
set locale(value) {
|
|
93
|
-
if (this.nativeElement) {
|
|
94
|
-
this.nativeElement.locale = value;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
/** The clipboard property is used to enable/disable clipboard operations with Ctrl+C, Ctrl+X and Ctrl+V keyboard navigations..
|
|
98
|
-
* Property type: GridClipboard
|
|
99
|
-
*/
|
|
100
|
-
get clipboard() {
|
|
101
|
-
return this.nativeElement ? this.nativeElement.clipboard : undefined;
|
|
102
|
-
}
|
|
103
|
-
set clipboard(value) {
|
|
104
|
-
if (this.nativeElement) {
|
|
105
|
-
this.nativeElement.clipboard = value;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/** The columns property is used to describe all columns displayed in the grid.
|
|
109
|
-
* Property type: {label: string, dataField: string}[] | string[] | number | GridColumn[]
|
|
110
|
-
*/
|
|
111
|
-
get columns() {
|
|
112
|
-
return this.nativeElement ? this.nativeElement.columns : undefined;
|
|
113
|
-
}
|
|
114
|
-
set columns(value) {
|
|
115
|
-
if (this.nativeElement) {
|
|
116
|
-
this.nativeElement.columns = value;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/** Context Menu is the drop-down menu displayed after right-clicking a Grid row. It allows you to delete row, edit cell or row depending on the edit mode. The 'contextMenuItemCustom' dataSource option allows you to add custom menu item to the context menu. You can replace the context menu by using the 'selector' property and setting it to ID of a Smart.Menu component.
|
|
120
|
-
* Property type: GridContextMenu
|
|
121
|
-
*/
|
|
122
|
-
get contextMenu() {
|
|
123
|
-
return this.nativeElement ? this.nativeElement.contextMenu : undefined;
|
|
124
|
-
}
|
|
125
|
-
set contextMenu(value) {
|
|
126
|
-
if (this.nativeElement) {
|
|
127
|
-
this.nativeElement.contextMenu = value;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/** Column Menu is the drop-down menu displayed after clicking the column header's drop-down button, which is displayed when you hover the column header. It allows you to customize column settings. For example: Sort, Filter or Group the Grid by the current column.
|
|
131
|
-
* Property type: GridColumnMenu
|
|
132
|
-
*/
|
|
133
|
-
get columnMenu() {
|
|
134
|
-
return this.nativeElement ? this.nativeElement.columnMenu : undefined;
|
|
135
|
-
}
|
|
136
|
-
set columnMenu(value) {
|
|
137
|
-
if (this.nativeElement) {
|
|
138
|
-
this.nativeElement.columnMenu = value;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/** Describes the settings of the column groups.
|
|
142
|
-
* Property type: GridColumnGroup[]
|
|
143
|
-
*/
|
|
144
|
-
get columnGroups() {
|
|
145
|
-
return this.nativeElement ? this.nativeElement.columnGroups : undefined;
|
|
146
|
-
}
|
|
147
|
-
set columnGroups(value) {
|
|
148
|
-
if (this.nativeElement) {
|
|
149
|
-
this.nativeElement.columnGroups = value;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
/** Sets or gets details about conditional formatting to be applied to the Grid's cells.
|
|
153
|
-
* Property type: GridConditionalFormatting[]
|
|
154
|
-
*/
|
|
155
|
-
get conditionalFormatting() {
|
|
156
|
-
return this.nativeElement ? this.nativeElement.conditionalFormatting : undefined;
|
|
157
|
-
}
|
|
158
|
-
set conditionalFormatting(value) {
|
|
159
|
-
if (this.nativeElement) {
|
|
160
|
-
this.nativeElement.conditionalFormatting = value;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/** Sets the Grid Charting Data Visualization.
|
|
164
|
-
* Property type: GridCharting
|
|
165
|
-
*/
|
|
166
|
-
get charting() {
|
|
167
|
-
return this.nativeElement ? this.nativeElement.charting : undefined;
|
|
168
|
-
}
|
|
169
|
-
set charting(value) {
|
|
170
|
-
if (this.nativeElement) {
|
|
171
|
-
this.nativeElement.charting = value;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
/** Sets the TreeGrid checkboxes.
|
|
175
|
-
* Property type: GridCheckBoxes
|
|
176
|
-
*/
|
|
177
|
-
get checkBoxes() {
|
|
178
|
-
return this.nativeElement ? this.nativeElement.checkBoxes : undefined;
|
|
179
|
-
}
|
|
180
|
-
set checkBoxes(value) {
|
|
181
|
-
if (this.nativeElement) {
|
|
182
|
-
this.nativeElement.checkBoxes = value;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/** Sets the Grid Data Export options.
|
|
186
|
-
* Property type: GridDataExport
|
|
187
|
-
*/
|
|
188
|
-
get dataExport() {
|
|
189
|
-
return this.nativeElement ? this.nativeElement.dataExport : undefined;
|
|
190
|
-
}
|
|
191
|
-
set dataExport(value) {
|
|
192
|
-
if (this.nativeElement) {
|
|
193
|
-
this.nativeElement.dataExport = value;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/** Sets the grid's data source. The value of dataSource can be an instance of JQX.DataAdapter or an Array.
|
|
197
|
-
* Property type: any
|
|
198
|
-
*/
|
|
199
|
-
get dataSource() {
|
|
200
|
-
return this.nativeElement ? this.nativeElement.dataSource : undefined;
|
|
201
|
-
}
|
|
202
|
-
set dataSource(value) {
|
|
203
|
-
if (this.nativeElement) {
|
|
204
|
-
this.nativeElement.dataSource = value;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/** Sets the grid's data source settings when the dataSource property is set to an Array or URL.
|
|
208
|
-
* Property type: GridDataSourceSettings
|
|
209
|
-
*/
|
|
210
|
-
get dataSourceSettings() {
|
|
211
|
-
return this.nativeElement ? this.nativeElement.dataSourceSettings : undefined;
|
|
212
|
-
}
|
|
213
|
-
set dataSourceSettings(value) {
|
|
214
|
-
if (this.nativeElement) {
|
|
215
|
-
this.nativeElement.dataSourceSettings = value;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/** Describes the grid's editing settings.
|
|
219
|
-
* Property type: GridEditing
|
|
220
|
-
*/
|
|
221
|
-
get editing() {
|
|
222
|
-
return this.nativeElement ? this.nativeElement.editing : undefined;
|
|
223
|
-
}
|
|
224
|
-
set editing(value) {
|
|
225
|
-
if (this.nativeElement) {
|
|
226
|
-
this.nativeElement.editing = value;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
/** Describes the grid's filtering settings.
|
|
230
|
-
* Property type: GridFiltering
|
|
231
|
-
*/
|
|
232
|
-
get filtering() {
|
|
233
|
-
return this.nativeElement ? this.nativeElement.filtering : undefined;
|
|
234
|
-
}
|
|
235
|
-
set filtering(value) {
|
|
236
|
-
if (this.nativeElement) {
|
|
237
|
-
this.nativeElement.filtering = value;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
/** Describes the grid's grouping settings.
|
|
241
|
-
* Property type: GridGrouping
|
|
242
|
-
*/
|
|
243
|
-
get grouping() {
|
|
244
|
-
return this.nativeElement ? this.nativeElement.grouping : undefined;
|
|
245
|
-
}
|
|
246
|
-
set grouping(value) {
|
|
247
|
-
if (this.nativeElement) {
|
|
248
|
-
this.nativeElement.grouping = value;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
/** Sets the messages values.
|
|
252
|
-
* Property type: any
|
|
253
|
-
*/
|
|
254
|
-
get messages() {
|
|
255
|
-
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
256
|
-
}
|
|
257
|
-
set messages(value) {
|
|
258
|
-
if (this.nativeElement) {
|
|
259
|
-
this.nativeElement.messages = value;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
/** Callback function(chart: JQX.Chart) called when the chart has been initialized. You can use this function to customize the Chart element settings.
|
|
263
|
-
* Property type: {(cell: GridCell): void}
|
|
264
|
-
*/
|
|
265
|
-
get onCellValue() {
|
|
266
|
-
return this.nativeElement ? this.nativeElement.onCellValue : undefined;
|
|
267
|
-
}
|
|
268
|
-
set onCellValue(value) {
|
|
269
|
-
if (this.nativeElement) {
|
|
270
|
-
this.nativeElement.onCellValue = value;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
/** Callback function() called when the grid has been rendered.
|
|
274
|
-
* Property type: {(cells: GridCell[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void}
|
|
275
|
-
*/
|
|
276
|
-
get onCellUpdate() {
|
|
277
|
-
return this.nativeElement ? this.nativeElement.onCellUpdate : undefined;
|
|
278
|
-
}
|
|
279
|
-
set onCellUpdate(value) {
|
|
280
|
-
if (this.nativeElement) {
|
|
281
|
-
this.nativeElement.onCellUpdate = value;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
/** Callback function() called when the grid has been rendered for first time and bindings are completed. The component is ready.
|
|
285
|
-
* Property type: {(cell: GridCell): void}
|
|
286
|
-
*/
|
|
287
|
-
get onCellRender() {
|
|
288
|
-
return this.nativeElement ? this.nativeElement.onCellRender : undefined;
|
|
289
|
-
}
|
|
290
|
-
set onCellRender(value) {
|
|
291
|
-
if (this.nativeElement) {
|
|
292
|
-
this.nativeElement.onCellRender = value;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
/** Sets or gets the rows CSS class rules. Different CSS class names are conditionally applied. Example: rowCSSRules: { 'cell-class-1': settings => settings.data.quantity === 5, 'cell-class-2': settings => settings.data.quantity < 5, 'cell-class-3': settings => settings.data.quantity > 5 }. The settings object contains the following properties: index, data, row, api.
|
|
296
|
-
* Property type: {(): void}
|
|
297
|
-
*/
|
|
298
|
-
get onBeforeInit() {
|
|
299
|
-
return this.nativeElement ? this.nativeElement.onBeforeInit : undefined;
|
|
300
|
-
}
|
|
301
|
-
set onBeforeInit(value) {
|
|
302
|
-
if (this.nativeElement) {
|
|
303
|
-
this.nativeElement.onBeforeInit = value;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
/** Sets or gets the id of the current user. Has to correspond to the id of an item from the users property/array. Depending on the current user, different privileges are enabled. If no current user is set, privileges depend on the element's properties.
|
|
307
|
-
* Property type: {(): void}
|
|
308
|
-
*/
|
|
309
|
-
get onInit() {
|
|
310
|
-
return this.nativeElement ? this.nativeElement.onInit : undefined;
|
|
311
|
-
}
|
|
312
|
-
set onInit(value) {
|
|
313
|
-
if (this.nativeElement) {
|
|
314
|
-
this.nativeElement.onInit = value;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
/** Sets the grid users. Expects an array with 'id', 'name' and optionally 'color' and 'image' properties.
|
|
318
|
-
* Property type: {(): void}
|
|
319
|
-
*/
|
|
320
|
-
get onAfterInit() {
|
|
321
|
-
return this.nativeElement ? this.nativeElement.onAfterInit : undefined;
|
|
322
|
-
}
|
|
323
|
-
set onAfterInit(value) {
|
|
324
|
-
if (this.nativeElement) {
|
|
325
|
-
this.nativeElement.onAfterInit = value;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
/** Describes the paging settings.
|
|
329
|
-
* Property type: any
|
|
330
|
-
*/
|
|
331
|
-
get onChartInit() {
|
|
332
|
-
return this.nativeElement ? this.nativeElement.onChartInit : undefined;
|
|
333
|
-
}
|
|
334
|
-
set onChartInit(value) {
|
|
335
|
-
if (this.nativeElement) {
|
|
336
|
-
this.nativeElement.onChartInit = value;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
/** Describes the pager settings.
|
|
340
|
-
* Property type: any
|
|
341
|
-
*/
|
|
342
|
-
get onRender() {
|
|
343
|
-
return this.nativeElement ? this.nativeElement.onRender : undefined;
|
|
344
|
-
}
|
|
345
|
-
set onRender(value) {
|
|
346
|
-
if (this.nativeElement) {
|
|
347
|
-
this.nativeElement.onRender = value;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
/** Sets the row details.
|
|
351
|
-
* Property type: any
|
|
352
|
-
*/
|
|
353
|
-
get onLoad() {
|
|
354
|
-
return this.nativeElement ? this.nativeElement.onLoad : undefined;
|
|
355
|
-
}
|
|
356
|
-
set onLoad(value) {
|
|
357
|
-
if (this.nativeElement) {
|
|
358
|
-
this.nativeElement.onLoad = value;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
/** Sets the scroll mode settings.
|
|
362
|
-
* Property type: {(event: KeyboardEvent): void}
|
|
363
|
-
*/
|
|
364
|
-
get onKey() {
|
|
365
|
-
return this.nativeElement ? this.nativeElement.onKey : undefined;
|
|
366
|
-
}
|
|
367
|
-
set onKey(value) {
|
|
368
|
-
if (this.nativeElement) {
|
|
369
|
-
this.nativeElement.onKey = value;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
/** Describes the column header settings.
|
|
373
|
-
* Property type: {(index: number, row: GridRow): void}
|
|
374
|
-
*/
|
|
375
|
-
get onRowInit() {
|
|
376
|
-
return this.nativeElement ? this.nativeElement.onRowInit : undefined;
|
|
377
|
-
}
|
|
378
|
-
set onRowInit(value) {
|
|
379
|
-
if (this.nativeElement) {
|
|
380
|
-
this.nativeElement.onRowInit = value;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
/** Describes the summary row settings.
|
|
384
|
-
* Property type: {(index: number, row: GridRow, details: HTMLElement): void}
|
|
385
|
-
*/
|
|
386
|
-
get onRowDetailInit() {
|
|
387
|
-
return this.nativeElement ? this.nativeElement.onRowDetailInit : undefined;
|
|
388
|
-
}
|
|
389
|
-
set onRowDetailInit(value) {
|
|
390
|
-
if (this.nativeElement) {
|
|
391
|
-
this.nativeElement.onRowDetailInit = value;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
/** Describes the settings for the group header.
|
|
395
|
-
* Property type: {(index: number, row: GridRow, details: HTMLElement): void}
|
|
396
|
-
*/
|
|
397
|
-
get onRowDetailUpdated() {
|
|
398
|
-
return this.nativeElement ? this.nativeElement.onRowDetailUpdated : undefined;
|
|
399
|
-
}
|
|
400
|
-
set onRowDetailUpdated(value) {
|
|
401
|
-
if (this.nativeElement) {
|
|
402
|
-
this.nativeElement.onRowDetailUpdated = value;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
/** Describes the header settings of the grid.
|
|
406
|
-
* Property type: {(index: number, row: GridRow, history: any[]): void}
|
|
407
|
-
*/
|
|
408
|
-
get onRowHistory() {
|
|
409
|
-
return this.nativeElement ? this.nativeElement.onRowHistory : undefined;
|
|
410
|
-
}
|
|
411
|
-
set onRowHistory(value) {
|
|
412
|
-
if (this.nativeElement) {
|
|
413
|
-
this.nativeElement.onRowHistory = value;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
/** Describes the footer settings of the grid.
|
|
417
|
-
* Property type: {(index: number, row: GridRow, history: any[]): void}
|
|
418
|
-
*/
|
|
419
|
-
get onRowStyle() {
|
|
420
|
-
return this.nativeElement ? this.nativeElement.onRowStyle : undefined;
|
|
421
|
-
}
|
|
422
|
-
set onRowStyle(value) {
|
|
423
|
-
if (this.nativeElement) {
|
|
424
|
-
this.nativeElement.onRowStyle = value;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
/** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
|
428
|
-
* Property type: {(index: number[], row: GridRow[]): void}
|
|
429
|
-
*/
|
|
430
|
-
get onRowInserted() {
|
|
431
|
-
return this.nativeElement ? this.nativeElement.onRowInserted : undefined;
|
|
432
|
-
}
|
|
433
|
-
set onRowInserted(value) {
|
|
434
|
-
if (this.nativeElement) {
|
|
435
|
-
this.nativeElement.onRowInserted = value;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
/** The rows property is used to describe all rows displayed in the grid.
|
|
439
|
-
* Property type: {(indexes: number[], rows: GridRow[]): void}
|
|
440
|
-
*/
|
|
441
|
-
get onRowRemoved() {
|
|
442
|
-
return this.nativeElement ? this.nativeElement.onRowRemoved : undefined;
|
|
443
|
-
}
|
|
444
|
-
set onRowRemoved(value) {
|
|
445
|
-
if (this.nativeElement) {
|
|
446
|
-
this.nativeElement.onRowRemoved = value;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
/** Describes the selection settings.
|
|
450
|
-
* Property type: {(index: number[], row: GridRow[], oldValues: any[], values: any[], confirm: {(commit: boolean): void}): void}
|
|
451
|
-
*/
|
|
452
|
-
get onRowUpdate() {
|
|
453
|
-
return this.nativeElement ? this.nativeElement.onRowUpdate : undefined;
|
|
454
|
-
}
|
|
455
|
-
set onRowUpdate(value) {
|
|
456
|
-
if (this.nativeElement) {
|
|
457
|
-
this.nativeElement.onRowUpdate = value;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
/** Describes sorting settings.
|
|
461
|
-
* Property type: {(index: number[], row: GridRow[]): void}
|
|
462
|
-
*/
|
|
463
|
-
get onRowUpdated() {
|
|
464
|
-
return this.nativeElement ? this.nativeElement.onRowUpdated : undefined;
|
|
465
|
-
}
|
|
466
|
-
set onRowUpdated(value) {
|
|
467
|
-
if (this.nativeElement) {
|
|
468
|
-
this.nativeElement.onRowUpdated = value;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
/** undefined
|
|
472
|
-
* Property type: {(index: number, data: any, row: GridRow[]): void}
|
|
473
|
-
*/
|
|
474
|
-
get onRowClass() {
|
|
475
|
-
return this.nativeElement ? this.nativeElement.onRowClass : undefined;
|
|
476
|
-
}
|
|
477
|
-
set onRowClass(value) {
|
|
478
|
-
if (this.nativeElement) {
|
|
479
|
-
this.nativeElement.onRowClass = value;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
/** undefined
|
|
483
|
-
* Property type: {(index: number, dataField: string, cellValue: any, data: any, row: GridRow[]): void}
|
|
484
|
-
*/
|
|
485
|
-
get onCellClass() {
|
|
486
|
-
return this.nativeElement ? this.nativeElement.onCellClass : undefined;
|
|
487
|
-
}
|
|
488
|
-
set onCellClass(value) {
|
|
489
|
-
if (this.nativeElement) {
|
|
490
|
-
this.nativeElement.onCellClass = value;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
/** undefined
|
|
494
|
-
* Property type: {(index: number, column: GridColumn): void}
|
|
495
|
-
*/
|
|
496
|
-
get onColumnInit() {
|
|
497
|
-
return this.nativeElement ? this.nativeElement.onColumnInit : undefined;
|
|
498
|
-
}
|
|
499
|
-
set onColumnInit(value) {
|
|
500
|
-
if (this.nativeElement) {
|
|
501
|
-
this.nativeElement.onColumnInit = value;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
/** undefined
|
|
505
|
-
* Property type: {(index: number, column: GridColumn): void}
|
|
506
|
-
*/
|
|
507
|
-
get onColumnInserted() {
|
|
508
|
-
return this.nativeElement ? this.nativeElement.onColumnInserted : undefined;
|
|
509
|
-
}
|
|
510
|
-
set onColumnInserted(value) {
|
|
511
|
-
if (this.nativeElement) {
|
|
512
|
-
this.nativeElement.onColumnInserted = value;
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
/** undefined
|
|
516
|
-
* Property type: {(index: number, column: GridColumn): void}
|
|
517
|
-
*/
|
|
518
|
-
get onColumnRemoved() {
|
|
519
|
-
return this.nativeElement ? this.nativeElement.onColumnRemoved : undefined;
|
|
520
|
-
}
|
|
521
|
-
set onColumnRemoved(value) {
|
|
522
|
-
if (this.nativeElement) {
|
|
523
|
-
this.nativeElement.onColumnRemoved = value;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
/** undefined
|
|
527
|
-
* Property type: {(index: number, column: GridColumn): void}
|
|
528
|
-
*/
|
|
529
|
-
get onColumnUpdated() {
|
|
530
|
-
return this.nativeElement ? this.nativeElement.onColumnUpdated : undefined;
|
|
531
|
-
}
|
|
532
|
-
set onColumnUpdated(value) {
|
|
533
|
-
if (this.nativeElement) {
|
|
534
|
-
this.nativeElement.onColumnUpdated = value;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
/** undefined
|
|
538
|
-
* Property type: {(dataField: string, cloneColumnDataField: string, index: number, duplicateCells: boolean): void}
|
|
539
|
-
*/
|
|
540
|
-
get onColumnClone() {
|
|
541
|
-
return this.nativeElement ? this.nativeElement.onColumnClone : undefined;
|
|
542
|
-
}
|
|
543
|
-
set onColumnClone(value) {
|
|
544
|
-
if (this.nativeElement) {
|
|
545
|
-
this.nativeElement.onColumnClone = value;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
/** undefined
|
|
549
|
-
* Property type: {(name: string, command: any, details: GridCell, event: Event | KeyboardEvent | PointerEvent, handled: boolean): void}
|
|
550
|
-
*/
|
|
551
|
-
get onCommand() {
|
|
552
|
-
return this.nativeElement ? this.nativeElement.onCommand : undefined;
|
|
553
|
-
}
|
|
554
|
-
set onCommand(value) {
|
|
555
|
-
if (this.nativeElement) {
|
|
556
|
-
this.nativeElement.onCommand = value;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
/** undefined
|
|
560
|
-
* Property type: any
|
|
561
|
-
*/
|
|
562
|
-
get rowCSSRules() {
|
|
563
|
-
return this.nativeElement ? this.nativeElement.rowCSSRules : undefined;
|
|
564
|
-
}
|
|
565
|
-
set rowCSSRules(value) {
|
|
566
|
-
if (this.nativeElement) {
|
|
567
|
-
this.nativeElement.rowCSSRules = value;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
/** undefined
|
|
571
|
-
* Property type: string | number
|
|
572
|
-
*/
|
|
573
|
-
get currentUser() {
|
|
574
|
-
return this.nativeElement ? this.nativeElement.currentUser : undefined;
|
|
575
|
-
}
|
|
576
|
-
set currentUser(value) {
|
|
577
|
-
if (this.nativeElement) {
|
|
578
|
-
this.nativeElement.currentUser = value;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
/** undefined
|
|
582
|
-
* Property type: any[]
|
|
583
|
-
*/
|
|
584
|
-
get users() {
|
|
585
|
-
return this.nativeElement ? this.nativeElement.users : undefined;
|
|
586
|
-
}
|
|
587
|
-
set users(value) {
|
|
588
|
-
if (this.nativeElement) {
|
|
589
|
-
this.nativeElement.users = value;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
/** undefined
|
|
593
|
-
* Property type: GridPaging
|
|
594
|
-
*/
|
|
595
|
-
get paging() {
|
|
596
|
-
return this.nativeElement ? this.nativeElement.paging : undefined;
|
|
597
|
-
}
|
|
598
|
-
set paging(value) {
|
|
599
|
-
if (this.nativeElement) {
|
|
600
|
-
this.nativeElement.paging = value;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
/** undefined
|
|
604
|
-
* Property type: GridPager
|
|
605
|
-
*/
|
|
606
|
-
get pager() {
|
|
607
|
-
return this.nativeElement ? this.nativeElement.pager : undefined;
|
|
608
|
-
}
|
|
609
|
-
set pager(value) {
|
|
610
|
-
if (this.nativeElement) {
|
|
611
|
-
this.nativeElement.pager = value;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
/** undefined
|
|
615
|
-
* Property type: GridRowDetail
|
|
616
|
-
*/
|
|
617
|
-
get rowDetail() {
|
|
618
|
-
return this.nativeElement ? this.nativeElement.rowDetail : undefined;
|
|
619
|
-
}
|
|
620
|
-
set rowDetail(value) {
|
|
621
|
-
if (this.nativeElement) {
|
|
622
|
-
this.nativeElement.rowDetail = value;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
/** undefined
|
|
626
|
-
* Property type: Scrolling | string
|
|
627
|
-
*/
|
|
628
|
-
get scrolling() {
|
|
629
|
-
return this.nativeElement ? this.nativeElement.scrolling : undefined;
|
|
630
|
-
}
|
|
631
|
-
set scrolling(value) {
|
|
632
|
-
if (this.nativeElement) {
|
|
633
|
-
this.nativeElement.scrolling = value;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
/** undefined
|
|
637
|
-
* Property type: GridColumnHeader
|
|
638
|
-
*/
|
|
639
|
-
get columnHeader() {
|
|
640
|
-
return this.nativeElement ? this.nativeElement.columnHeader : undefined;
|
|
641
|
-
}
|
|
642
|
-
set columnHeader(value) {
|
|
643
|
-
if (this.nativeElement) {
|
|
644
|
-
this.nativeElement.columnHeader = value;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
/** undefined
|
|
648
|
-
* Property type: GridSummaryRow
|
|
649
|
-
*/
|
|
650
|
-
get summaryRow() {
|
|
651
|
-
return this.nativeElement ? this.nativeElement.summaryRow : undefined;
|
|
652
|
-
}
|
|
653
|
-
set summaryRow(value) {
|
|
654
|
-
if (this.nativeElement) {
|
|
655
|
-
this.nativeElement.summaryRow = value;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
/** undefined
|
|
659
|
-
* Property type: GridGroupHeader
|
|
660
|
-
*/
|
|
661
|
-
get groupHeader() {
|
|
662
|
-
return this.nativeElement ? this.nativeElement.groupHeader : undefined;
|
|
663
|
-
}
|
|
664
|
-
set groupHeader(value) {
|
|
665
|
-
if (this.nativeElement) {
|
|
666
|
-
this.nativeElement.groupHeader = value;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
/** undefined
|
|
670
|
-
* Property type: GridHeader
|
|
671
|
-
*/
|
|
672
|
-
get header() {
|
|
673
|
-
return this.nativeElement ? this.nativeElement.header : undefined;
|
|
674
|
-
}
|
|
675
|
-
set header(value) {
|
|
676
|
-
if (this.nativeElement) {
|
|
677
|
-
this.nativeElement.header = value;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
/** undefined
|
|
681
|
-
* Property type: GridFooter
|
|
682
|
-
*/
|
|
683
|
-
get footer() {
|
|
684
|
-
return this.nativeElement ? this.nativeElement.footer : undefined;
|
|
685
|
-
}
|
|
686
|
-
set footer(value) {
|
|
687
|
-
if (this.nativeElement) {
|
|
688
|
-
this.nativeElement.footer = value;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
/** undefined
|
|
692
|
-
* Property type: boolean
|
|
693
|
-
*/
|
|
694
|
-
get rightToLeft() {
|
|
695
|
-
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
696
|
-
}
|
|
697
|
-
set rightToLeft(value) {
|
|
698
|
-
if (this.nativeElement) {
|
|
699
|
-
this.nativeElement.rightToLeft = value;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
/** undefined
|
|
703
|
-
* Property type: GridRow[]
|
|
704
|
-
*/
|
|
705
|
-
get rows() {
|
|
706
|
-
return this.nativeElement ? this.nativeElement.rows : undefined;
|
|
707
|
-
}
|
|
708
|
-
set rows(value) {
|
|
709
|
-
if (this.nativeElement) {
|
|
710
|
-
this.nativeElement.rows = value;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
/** undefined
|
|
714
|
-
* Property type: GridSelection
|
|
715
|
-
*/
|
|
716
|
-
get selection() {
|
|
717
|
-
return this.nativeElement ? this.nativeElement.selection : undefined;
|
|
718
|
-
}
|
|
719
|
-
set selection(value) {
|
|
720
|
-
if (this.nativeElement) {
|
|
721
|
-
this.nativeElement.selection = value;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
/** undefined
|
|
725
|
-
* Property type: GridSorting
|
|
726
|
-
*/
|
|
727
|
-
get sorting() {
|
|
728
|
-
return this.nativeElement ? this.nativeElement.sorting : undefined;
|
|
729
|
-
}
|
|
730
|
-
set sorting(value) {
|
|
731
|
-
if (this.nativeElement) {
|
|
732
|
-
this.nativeElement.sorting = value;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
// Gets the properties of the React component.
|
|
736
|
-
get properties() {
|
|
737
|
-
return ["appearance", "behavior", "layout", "locale", "clipboard", "columns", "contextMenu", "columnMenu", "columnGroups", "conditionalFormatting", "charting", "checkBoxes", "dataExport", "dataSource", "dataSourceSettings", "editing", "filtering", "grouping", "messages", "onCellValue", "onCellUpdate", "onCellRender", "onBeforeInit", "onInit", "onAfterInit", "onChartInit", "onRender", "onLoad", "onKey", "onRowInit", "onRowDetailInit", "onRowDetailUpdated", "onRowHistory", "onRowStyle", "onRowInserted", "onRowRemoved", "onRowUpdate", "onRowUpdated", "onRowClass", "onCellClass", "onColumnInit", "onColumnInserted", "onColumnRemoved", "onColumnUpdated", "onColumnClone", "onCommand", "rowCSSRules", "currentUser", "users", "paging", "pager", "rowDetail", "scrolling", "columnHeader", "summaryRow", "groupHeader", "header", "footer", "rightToLeft", "rows", "selection", "sorting"];
|
|
738
|
-
}
|
|
739
|
-
// Gets the events of the React component.
|
|
740
|
-
get eventListeners() {
|
|
741
|
-
return ["onBeginEdit", "onBatchChange", "onBatchCancel", "onChange", "onColumnClick", "onColumnDoubleClick", "onColumnResize", "onColumnDragStart", "onColumnDragging", "onColumnDragEnd", "onColumnReorder", "onCommentAdd", "onCommentRemove", "onContextMenuItemClick", "onRowDragStart", "onRowDragging", "onRowDragEnd", "onRowReorder", "onRowExpand", "onRowCollapse", "onRowClick", "onRowDoubleClick", "onRowResize", "onRowStarred", "onCellClick", "onCellDoubleClick", "onEndEdit", "onFilter", "onGroup", "onOpenColumnDialog", "onCloseColumnDialog", "onResize", "onRowTap", "onCellTap", "onPage", "onSort", "onScrollBottomReached", "onScrollTopReached", "onCreate", "onReady"];
|
|
742
|
-
}
|
|
743
|
-
/** Adds a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
744
|
-
* @param {any} data. row data matching the data source
|
|
745
|
-
* @param {boolean} insertAtBottom?. Determines whether to add the new row to the bottom or top of the collection. The default value is 'true'
|
|
746
|
-
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the new row is added. The callback's argument is the new row.
|
|
747
|
-
*/
|
|
748
|
-
addRow(data, insertAtBottom, callback) {
|
|
749
|
-
if (this.nativeElement.isRendered) {
|
|
750
|
-
this.nativeElement.addRow(data, insertAtBottom, callback);
|
|
751
|
-
}
|
|
752
|
-
else {
|
|
753
|
-
this.nativeElement.whenRendered(() => {
|
|
754
|
-
this.nativeElement.addRow(data, insertAtBottom, callback);
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
/** Adds a new row and puts it into edit mode. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
759
|
-
* @param {string} position?. 'near' or 'far'
|
|
760
|
-
* @returns {boolean}
|
|
761
|
-
*/
|
|
762
|
-
addNewRow(position) {
|
|
763
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
764
|
-
const getResultOnRender = () => {
|
|
765
|
-
return new Promise(resolve => {
|
|
766
|
-
this.nativeElement.whenRendered(() => {
|
|
767
|
-
const result = this.nativeElement.addNewRow(position);
|
|
768
|
-
resolve(result);
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
};
|
|
772
|
-
const result = yield getResultOnRender();
|
|
773
|
-
return result;
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
/** Adds a new column.
|
|
777
|
-
* @param {any} column. A Grid column object. See 'columns' property.
|
|
778
|
-
* @returns {boolean}
|
|
779
|
-
*/
|
|
780
|
-
addNewColumn(column) {
|
|
781
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
782
|
-
const getResultOnRender = () => {
|
|
783
|
-
return new Promise(resolve => {
|
|
784
|
-
this.nativeElement.whenRendered(() => {
|
|
785
|
-
const result = this.nativeElement.addNewColumn(column);
|
|
786
|
-
resolve(result);
|
|
787
|
-
});
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
|
-
const result = yield getResultOnRender();
|
|
791
|
-
return result;
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
/** Adds a new unbound row to the top or bottom. Unbound rows are not part of the Grid's dataSource. They become part of the dataSource, after an unbound row is edited.
|
|
795
|
-
* @param {number} count. The count of unbound rows.
|
|
796
|
-
* @param {string} position?. 'near' or 'far'
|
|
797
|
-
* @returns {boolean}
|
|
798
|
-
*/
|
|
799
|
-
addUnboundRow(count, position) {
|
|
800
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
801
|
-
const getResultOnRender = () => {
|
|
802
|
-
return new Promise(resolve => {
|
|
803
|
-
this.nativeElement.whenRendered(() => {
|
|
804
|
-
const result = this.nativeElement.addUnboundRow(count, position);
|
|
805
|
-
resolve(result);
|
|
806
|
-
});
|
|
807
|
-
});
|
|
808
|
-
};
|
|
809
|
-
const result = yield getResultOnRender();
|
|
810
|
-
return result;
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
/** Adds a filter to a column. This method will apply a filter to the Grid data. Example for adding multiple filters to a column: grid.addFilter('lastName', ['CONTAINS "burke"', 'or', 'CONTAINS "peterson"']). Example for adding single filter to a column: grid.addFilter('lastName', 'CONTAINS "burke"'). Example for adding numeric filter: grid.addFilter('quantity', '<= 5')
|
|
814
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
815
|
-
* @param {string} filter. Filter expression like: 'startsWith B'. Example 2: ['contains Andrew or contains Nancy'], Example 3: ['quantity', '<= 3 and >= 8']. Filter conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
816
|
-
* @param {boolean} refreshFilters?. Set this to false, if you will use multiple 'addFilter' calls. By doing this, you will avoid unnecessary renders.
|
|
817
|
-
*/
|
|
818
|
-
addFilter(dataField, filter, refreshFilters) {
|
|
819
|
-
if (this.nativeElement.isRendered) {
|
|
820
|
-
this.nativeElement.addFilter(dataField, filter, refreshFilters);
|
|
821
|
-
}
|
|
822
|
-
else {
|
|
823
|
-
this.nativeElement.whenRendered(() => {
|
|
824
|
-
this.nativeElement.addFilter(dataField, filter, refreshFilters);
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
/** Groups the Grid by a data field. This method will add a group to the Grid when grouping is enabled.
|
|
829
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
830
|
-
*/
|
|
831
|
-
addGroup(dataField) {
|
|
832
|
-
if (this.nativeElement.isRendered) {
|
|
833
|
-
this.nativeElement.addGroup(dataField);
|
|
834
|
-
}
|
|
835
|
-
else {
|
|
836
|
-
this.nativeElement.whenRendered(() => {
|
|
837
|
-
this.nativeElement.addGroup(dataField);
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
/** Sorts the Grid by a data field. This method will add a sorting to the Grid when sorting is enabled.
|
|
842
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
843
|
-
* @param {string} sortOrder. column's sort order. Use 'asc' or 'desc'.
|
|
844
|
-
*/
|
|
845
|
-
addSort(dataField, sortOrder) {
|
|
846
|
-
if (this.nativeElement.isRendered) {
|
|
847
|
-
this.nativeElement.addSort(dataField, sortOrder);
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
850
|
-
this.nativeElement.whenRendered(() => {
|
|
851
|
-
this.nativeElement.addSort(dataField, sortOrder);
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
/** Auto-sizes grid rows. This method will update the height of all Grid rows.
|
|
856
|
-
*/
|
|
857
|
-
autoSizeRows() {
|
|
858
|
-
if (this.nativeElement.isRendered) {
|
|
859
|
-
this.nativeElement.autoSizeRows();
|
|
860
|
-
}
|
|
861
|
-
else {
|
|
862
|
-
this.nativeElement.whenRendered(() => {
|
|
863
|
-
this.nativeElement.autoSizeRows();
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
/** Auto-sizes grid columns. This method will update the width of all Grid columns.
|
|
868
|
-
*/
|
|
869
|
-
autoSizeColumns() {
|
|
870
|
-
if (this.nativeElement.isRendered) {
|
|
871
|
-
this.nativeElement.autoSizeColumns();
|
|
872
|
-
}
|
|
873
|
-
else {
|
|
874
|
-
this.nativeElement.whenRendered(() => {
|
|
875
|
-
this.nativeElement.autoSizeColumns();
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
/** Auto-sizes grid column. This method will update the width of a Grid column by measuring the cells and column header label width.
|
|
880
|
-
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
881
|
-
*/
|
|
882
|
-
autoSizeColumn(dataField) {
|
|
883
|
-
if (this.nativeElement.isRendered) {
|
|
884
|
-
this.nativeElement.autoSizeColumn(dataField);
|
|
885
|
-
}
|
|
886
|
-
else {
|
|
887
|
-
this.nativeElement.whenRendered(() => {
|
|
888
|
-
this.nativeElement.autoSizeColumn(dataField);
|
|
889
|
-
});
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
/** This method returns true, if all rows in the Grid are selected.
|
|
893
|
-
* @returns {boolean}
|
|
894
|
-
*/
|
|
895
|
-
areAllRowsSelected() {
|
|
896
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
897
|
-
const getResultOnRender = () => {
|
|
898
|
-
return new Promise(resolve => {
|
|
899
|
-
this.nativeElement.whenRendered(() => {
|
|
900
|
-
const result = this.nativeElement.areAllRowsSelected();
|
|
901
|
-
resolve(result);
|
|
902
|
-
});
|
|
903
|
-
});
|
|
904
|
-
};
|
|
905
|
-
const result = yield getResultOnRender();
|
|
906
|
-
return result;
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
/** Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once.
|
|
910
|
-
*/
|
|
911
|
-
beginUpdate() {
|
|
912
|
-
if (this.nativeElement.isRendered) {
|
|
913
|
-
this.nativeElement.beginUpdate();
|
|
914
|
-
}
|
|
915
|
-
else {
|
|
916
|
-
this.nativeElement.whenRendered(() => {
|
|
917
|
-
this.nativeElement.beginUpdate();
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
/** Begins row, cell or column. This method allows you to programmatically start a cell, row or column editing. After calling it, an editor HTMLElement will be created and displayed in the Grid.
|
|
922
|
-
* @param {string | number} rowId. row bound id
|
|
923
|
-
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
924
|
-
*/
|
|
925
|
-
beginEdit(rowId, dataField) {
|
|
926
|
-
if (this.nativeElement.isRendered) {
|
|
927
|
-
this.nativeElement.beginEdit(rowId, dataField);
|
|
928
|
-
}
|
|
929
|
-
else {
|
|
930
|
-
this.nativeElement.whenRendered(() => {
|
|
931
|
-
this.nativeElement.beginEdit(rowId, dataField);
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
/** Clears all filters. Refreshes the view and updates all filter input components.
|
|
936
|
-
*/
|
|
937
|
-
clearFilter() {
|
|
938
|
-
if (this.nativeElement.isRendered) {
|
|
939
|
-
this.nativeElement.clearFilter();
|
|
940
|
-
}
|
|
941
|
-
else {
|
|
942
|
-
this.nativeElement.whenRendered(() => {
|
|
943
|
-
this.nativeElement.clearFilter();
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
/** Clears all data groups. Refreshes the view and updates the DataGrid component.
|
|
948
|
-
*/
|
|
949
|
-
clearGroups() {
|
|
950
|
-
if (this.nativeElement.isRendered) {
|
|
951
|
-
this.nativeElement.clearGroups();
|
|
952
|
-
}
|
|
953
|
-
else {
|
|
954
|
-
this.nativeElement.whenRendered(() => {
|
|
955
|
-
this.nativeElement.clearGroups();
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
/** Clears all sorting. Refreshes the view and updates the DataGrid component.
|
|
960
|
-
*/
|
|
961
|
-
clearSort() {
|
|
962
|
-
if (this.nativeElement.isRendered) {
|
|
963
|
-
this.nativeElement.clearSort();
|
|
964
|
-
}
|
|
965
|
-
else {
|
|
966
|
-
this.nativeElement.whenRendered(() => {
|
|
967
|
-
this.nativeElement.clearSort();
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
/** Clears the selection that user have made. All row, cell and column selection highlights will be removed.
|
|
972
|
-
*/
|
|
973
|
-
clearSelection() {
|
|
974
|
-
if (this.nativeElement.isRendered) {
|
|
975
|
-
this.nativeElement.clearSelection();
|
|
976
|
-
}
|
|
977
|
-
else {
|
|
978
|
-
this.nativeElement.whenRendered(() => {
|
|
979
|
-
this.nativeElement.clearSelection();
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
/** Cancels the editing. This method closes the cell editor and cancels the changes.
|
|
984
|
-
*/
|
|
985
|
-
cancelEdit() {
|
|
986
|
-
if (this.nativeElement.isRendered) {
|
|
987
|
-
this.nativeElement.cancelEdit();
|
|
988
|
-
}
|
|
989
|
-
else {
|
|
990
|
-
this.nativeElement.whenRendered(() => {
|
|
991
|
-
this.nativeElement.cancelEdit();
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
/** Checks a TreeGrid row. This method updates the row's check-box.
|
|
996
|
-
* @param {string | number} rowId. row bound id
|
|
997
|
-
*/
|
|
998
|
-
checkRow(rowId) {
|
|
999
|
-
if (this.nativeElement.isRendered) {
|
|
1000
|
-
this.nativeElement.checkRow(rowId);
|
|
1001
|
-
}
|
|
1002
|
-
else {
|
|
1003
|
-
this.nativeElement.whenRendered(() => {
|
|
1004
|
-
this.nativeElement.checkRow(rowId);
|
|
1005
|
-
});
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
/** Checks all TreeGrid or Grouping rows. This method updates all check-boxes in the TreeGrid or Grouping rows.
|
|
1009
|
-
*/
|
|
1010
|
-
checkAllRows() {
|
|
1011
|
-
if (this.nativeElement.isRendered) {
|
|
1012
|
-
this.nativeElement.checkAllRows();
|
|
1013
|
-
}
|
|
1014
|
-
else {
|
|
1015
|
-
this.nativeElement.whenRendered(() => {
|
|
1016
|
-
this.nativeElement.checkAllRows();
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
/** Clears the user selection and empties the data source. The Grid will display 'No Rows' in the view.
|
|
1021
|
-
*/
|
|
1022
|
-
clearRows() {
|
|
1023
|
-
if (this.nativeElement.isRendered) {
|
|
1024
|
-
this.nativeElement.clearRows();
|
|
1025
|
-
}
|
|
1026
|
-
else {
|
|
1027
|
-
this.nativeElement.whenRendered(() => {
|
|
1028
|
-
this.nativeElement.clearRows();
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
/** Closes the column drop-down menu.
|
|
1033
|
-
*/
|
|
1034
|
-
closeMenu() {
|
|
1035
|
-
if (this.nativeElement.isRendered) {
|
|
1036
|
-
this.nativeElement.closeMenu();
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
this.nativeElement.whenRendered(() => {
|
|
1040
|
-
this.nativeElement.closeMenu();
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
/** Collapses a TreeGrid or Grouping row.
|
|
1045
|
-
* @param {string | number} rowId. row bound id
|
|
1046
|
-
*/
|
|
1047
|
-
collapseRow(rowId) {
|
|
1048
|
-
if (this.nativeElement.isRendered) {
|
|
1049
|
-
this.nativeElement.collapseRow(rowId);
|
|
1050
|
-
}
|
|
1051
|
-
else {
|
|
1052
|
-
this.nativeElement.whenRendered(() => {
|
|
1053
|
-
this.nativeElement.collapseRow(rowId);
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
/** Collapses all TreeGrid or Grouping rows.
|
|
1058
|
-
*/
|
|
1059
|
-
collapseAllRows() {
|
|
1060
|
-
if (this.nativeElement.isRendered) {
|
|
1061
|
-
this.nativeElement.collapseAllRows();
|
|
1062
|
-
}
|
|
1063
|
-
else {
|
|
1064
|
-
this.nativeElement.whenRendered(() => {
|
|
1065
|
-
this.nativeElement.collapseAllRows();
|
|
1066
|
-
});
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
/** Creates a Chart, when charting is enabled.
|
|
1070
|
-
* @param {string} type. Chart's type
|
|
1071
|
-
* @param {any} dataSource?. Chart's data source
|
|
1072
|
-
*/
|
|
1073
|
-
createChart(type, dataSource) {
|
|
1074
|
-
if (this.nativeElement.isRendered) {
|
|
1075
|
-
this.nativeElement.createChart(type, dataSource);
|
|
1076
|
-
}
|
|
1077
|
-
else {
|
|
1078
|
-
this.nativeElement.whenRendered(() => {
|
|
1079
|
-
this.nativeElement.createChart(type, dataSource);
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
/** Delete a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
1084
|
-
* @param {string | number} rowId. row bound id
|
|
1085
|
-
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the row is deleted. The callback's argument is the deleted row.
|
|
1086
|
-
*/
|
|
1087
|
-
deleteRow(rowId, callback) {
|
|
1088
|
-
if (this.nativeElement.isRendered) {
|
|
1089
|
-
this.nativeElement.deleteRow(rowId, callback);
|
|
1090
|
-
}
|
|
1091
|
-
else {
|
|
1092
|
-
this.nativeElement.whenRendered(() => {
|
|
1093
|
-
this.nativeElement.deleteRow(rowId, callback);
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
/** Scrolls to a row or cell. This method scrolls to a row or cell, when scrolling is necessary. If pagination is enabled, it will automatically change the page.
|
|
1098
|
-
* @param {string | number} rowId. row bound id
|
|
1099
|
-
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1100
|
-
* @returns {boolean}
|
|
1101
|
-
*/
|
|
1102
|
-
ensureVisible(rowId, dataField) {
|
|
1103
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1104
|
-
const getResultOnRender = () => {
|
|
1105
|
-
return new Promise(resolve => {
|
|
1106
|
-
this.nativeElement.whenRendered(() => {
|
|
1107
|
-
const result = this.nativeElement.ensureVisible(rowId, dataField);
|
|
1108
|
-
resolve(result);
|
|
1109
|
-
});
|
|
1110
|
-
});
|
|
1111
|
-
};
|
|
1112
|
-
const result = yield getResultOnRender();
|
|
1113
|
-
return result;
|
|
1114
|
-
});
|
|
1115
|
-
}
|
|
1116
|
-
/** Ends the editing. This method confirms all changes and closes the opened cell editor(s).
|
|
1117
|
-
*/
|
|
1118
|
-
endEdit() {
|
|
1119
|
-
if (this.nativeElement.isRendered) {
|
|
1120
|
-
this.nativeElement.endEdit();
|
|
1121
|
-
}
|
|
1122
|
-
else {
|
|
1123
|
-
this.nativeElement.whenRendered(() => {
|
|
1124
|
-
this.nativeElement.endEdit();
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
/** Ends the update operation. This method will resume the rendering and will refresh the Grid.
|
|
1129
|
-
* @param {boolean} refresh?. The flag that control the calls of the refresh method.
|
|
1130
|
-
*/
|
|
1131
|
-
endUpdate(refresh) {
|
|
1132
|
-
if (this.nativeElement.isRendered) {
|
|
1133
|
-
this.nativeElement.endUpdate(refresh);
|
|
1134
|
-
}
|
|
1135
|
-
else {
|
|
1136
|
-
this.nativeElement.whenRendered(() => {
|
|
1137
|
-
this.nativeElement.endUpdate(refresh);
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
/** Expands a TreeGrid or Grouping row. For example, if you want to expand the first group, then its second sub grup, then the first sub sub group, you can use: grid.expandRow('0.1.0');
|
|
1142
|
-
* @param {string | number} rowId. row bound id
|
|
1143
|
-
*/
|
|
1144
|
-
expandRow(rowId) {
|
|
1145
|
-
if (this.nativeElement.isRendered) {
|
|
1146
|
-
this.nativeElement.expandRow(rowId);
|
|
1147
|
-
}
|
|
1148
|
-
else {
|
|
1149
|
-
this.nativeElement.whenRendered(() => {
|
|
1150
|
-
this.nativeElement.expandRow(rowId);
|
|
1151
|
-
});
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
/** Expands rows to a given group level. For example 'grid.expandRowsToGroupLevel(1);' means that all groups at the root level will be expanded.
|
|
1155
|
-
* @param {number} level. row group level
|
|
1156
|
-
*/
|
|
1157
|
-
expandRowsToGroupLevel(level) {
|
|
1158
|
-
if (this.nativeElement.isRendered) {
|
|
1159
|
-
this.nativeElement.expandRowsToGroupLevel(level);
|
|
1160
|
-
}
|
|
1161
|
-
else {
|
|
1162
|
-
this.nativeElement.whenRendered(() => {
|
|
1163
|
-
this.nativeElement.expandRowsToGroupLevel(level);
|
|
1164
|
-
});
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
/** Expands all TreeGrid or Grouping rows.
|
|
1168
|
-
*/
|
|
1169
|
-
expandAllRows() {
|
|
1170
|
-
if (this.nativeElement.isRendered) {
|
|
1171
|
-
this.nativeElement.expandAllRows();
|
|
1172
|
-
}
|
|
1173
|
-
else {
|
|
1174
|
-
this.nativeElement.whenRendered(() => {
|
|
1175
|
-
this.nativeElement.expandAllRows();
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
/** Exports the Grid data to .XLSX, .PDF, .JSON, .XML, .CSV, .TSV, .HTML, .JPEG or .PNG. The method uses the options of the dataExport property.
|
|
1180
|
-
* @param {string} Dataformat. 'xlsx', 'pdf', 'json', 'xml', 'csv', 'tsv', 'html', 'png', 'jpeg'.
|
|
1181
|
-
*/
|
|
1182
|
-
exportData(Dataformat) {
|
|
1183
|
-
if (this.nativeElement.isRendered) {
|
|
1184
|
-
this.nativeElement.exportData(Dataformat);
|
|
1185
|
-
}
|
|
1186
|
-
else {
|
|
1187
|
-
this.nativeElement.whenRendered(() => {
|
|
1188
|
-
this.nativeElement.exportData(Dataformat);
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
/** Finds entries by using a query and returns an array of row ids. Example: const rows = grid.find('nancy'); returns all rows that have 'nancy' value. Example 2: const rows = grid.find('nancy, davolio'); returns all rows that have 'nancy' and 'davolio' values in the same row. Example 3: const rows = grid.find(5, 'quantity', '>'); returns all rows where the value of the 'quantity' field is > 5.
|
|
1193
|
-
* @param {string} query. Search query
|
|
1194
|
-
* @param {string} dataField?. Column data field.
|
|
1195
|
-
* @param {string} condition?. Conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
1196
|
-
* @returns {any[]}
|
|
1197
|
-
*/
|
|
1198
|
-
find(query, dataField, condition) {
|
|
1199
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1200
|
-
const getResultOnRender = () => {
|
|
1201
|
-
return new Promise(resolve => {
|
|
1202
|
-
this.nativeElement.whenRendered(() => {
|
|
1203
|
-
const result = this.nativeElement.find(query, dataField, condition);
|
|
1204
|
-
resolve(result);
|
|
1205
|
-
});
|
|
1206
|
-
});
|
|
1207
|
-
};
|
|
1208
|
-
const result = yield getResultOnRender();
|
|
1209
|
-
return result;
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
1212
|
-
/** Finds entries by using a query and returns an array of cells. Each cell in the array is also an array in this format: [id, dataField, value]. Example: const cells = grid.findCells('nancy'); returns all cells that have 'nancy' value. Example 2: const cells = grid.findCells('nancy, davolio'); returns all cells that have 'nancy' and 'davolio' values.
|
|
1213
|
-
* @param {string} query. Search query. You can enter multiple search strings, by using ','. Example: 'nancy, davolio'
|
|
1214
|
-
* @returns {any[]}
|
|
1215
|
-
*/
|
|
1216
|
-
findCells(query) {
|
|
1217
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1218
|
-
const getResultOnRender = () => {
|
|
1219
|
-
return new Promise(resolve => {
|
|
1220
|
-
this.nativeElement.whenRendered(() => {
|
|
1221
|
-
const result = this.nativeElement.findCells(query);
|
|
1222
|
-
resolve(result);
|
|
1223
|
-
});
|
|
1224
|
-
});
|
|
1225
|
-
};
|
|
1226
|
-
const result = yield getResultOnRender();
|
|
1227
|
-
return result;
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
/** Navigates to a page, when paging is enabled.
|
|
1231
|
-
* @param {number} index. page index
|
|
1232
|
-
*/
|
|
1233
|
-
goToPage(index) {
|
|
1234
|
-
if (this.nativeElement.isRendered) {
|
|
1235
|
-
this.nativeElement.goToPage(index);
|
|
1236
|
-
}
|
|
1237
|
-
else {
|
|
1238
|
-
this.nativeElement.whenRendered(() => {
|
|
1239
|
-
this.nativeElement.goToPage(index);
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
/** Navigates to the next page, when grid paging is enabled.
|
|
1244
|
-
*/
|
|
1245
|
-
nextPage() {
|
|
1246
|
-
if (this.nativeElement.isRendered) {
|
|
1247
|
-
this.nativeElement.nextPage();
|
|
1248
|
-
}
|
|
1249
|
-
else {
|
|
1250
|
-
this.nativeElement.whenRendered(() => {
|
|
1251
|
-
this.nativeElement.nextPage();
|
|
1252
|
-
});
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
/** Navigates to the prev page, when grid paging is enabled.
|
|
1256
|
-
*/
|
|
1257
|
-
prevPage() {
|
|
1258
|
-
if (this.nativeElement.isRendered) {
|
|
1259
|
-
this.nativeElement.prevPage();
|
|
1260
|
-
}
|
|
1261
|
-
else {
|
|
1262
|
-
this.nativeElement.whenRendered(() => {
|
|
1263
|
-
this.nativeElement.prevPage();
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
/** Navigates to the first page, when grid paging is enabled.
|
|
1268
|
-
*/
|
|
1269
|
-
firstPage() {
|
|
1270
|
-
if (this.nativeElement.isRendered) {
|
|
1271
|
-
this.nativeElement.firstPage();
|
|
1272
|
-
}
|
|
1273
|
-
else {
|
|
1274
|
-
this.nativeElement.whenRendered(() => {
|
|
1275
|
-
this.nativeElement.firstPage();
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
/** Navigates to the last page, when grid paging is enabled.
|
|
1280
|
-
*/
|
|
1281
|
-
lastPage() {
|
|
1282
|
-
if (this.nativeElement.isRendered) {
|
|
1283
|
-
this.nativeElement.lastPage();
|
|
1284
|
-
}
|
|
1285
|
-
else {
|
|
1286
|
-
this.nativeElement.whenRendered(() => {
|
|
1287
|
-
this.nativeElement.lastPage();
|
|
1288
|
-
});
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
/** Focuses and selects a cell or row. The keyboard navigation starts from the focused cell or row. Any previously applied selection will be cleared after calling this method.
|
|
1292
|
-
* @param {string | number} rowId. row bound id
|
|
1293
|
-
* @param {string} dataField?. column bound data field
|
|
1294
|
-
*/
|
|
1295
|
-
focusAndSelect(rowId, dataField) {
|
|
1296
|
-
if (this.nativeElement.isRendered) {
|
|
1297
|
-
this.nativeElement.focusAndSelect(rowId, dataField);
|
|
1298
|
-
}
|
|
1299
|
-
else {
|
|
1300
|
-
this.nativeElement.whenRendered(() => {
|
|
1301
|
-
this.nativeElement.focusAndSelect(rowId, dataField);
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
/** Iterates through each row in the grid and calls the callback for each row. This is similar to the forEach method on a JavaScript array. This is called for each row, ignoring grouping, filtering or sorting applied in the Grid.
|
|
1306
|
-
* @param {any} rowCallback. Callback function with a row object as parameter. Example: grid.forEachRow((row) => { console.log(row.id) });
|
|
1307
|
-
*/
|
|
1308
|
-
forEachRow(rowCallback) {
|
|
1309
|
-
if (this.nativeElement.isRendered) {
|
|
1310
|
-
this.nativeElement.forEachRow(rowCallback);
|
|
1311
|
-
}
|
|
1312
|
-
else {
|
|
1313
|
-
this.nativeElement.whenRendered(() => {
|
|
1314
|
-
this.nativeElement.forEachRow(rowCallback);
|
|
1315
|
-
});
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
/** Similar to forEachRow. Iterates through each row in the grid and calls the callback for each row. This method takes into account filtering and sorting applied to the Grid.
|
|
1319
|
-
* @param {any} rowCallback. Callback function with a row object as parameter. Example: grid.forEachRow((row) => { console.log(row.id) });
|
|
1320
|
-
*/
|
|
1321
|
-
forEachRowAfterFilterAndSort(rowCallback) {
|
|
1322
|
-
if (this.nativeElement.isRendered) {
|
|
1323
|
-
this.nativeElement.forEachRowAfterFilterAndSort(rowCallback);
|
|
1324
|
-
}
|
|
1325
|
-
else {
|
|
1326
|
-
this.nativeElement.whenRendered(() => {
|
|
1327
|
-
this.nativeElement.forEachRowAfterFilterAndSort(rowCallback);
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
/** Gets the maximum position of the vertical scrollbar. You can use this method in combination with the setVerticalScrollValue to apply a new scroll position.
|
|
1332
|
-
* @returns {number}
|
|
1333
|
-
*/
|
|
1334
|
-
getVerticalScrollMax() {
|
|
1335
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1336
|
-
const getResultOnRender = () => {
|
|
1337
|
-
return new Promise(resolve => {
|
|
1338
|
-
this.nativeElement.whenRendered(() => {
|
|
1339
|
-
const result = this.nativeElement.getVerticalScrollMax();
|
|
1340
|
-
resolve(result);
|
|
1341
|
-
});
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
1344
|
-
const result = yield getResultOnRender();
|
|
1345
|
-
return result;
|
|
1346
|
-
});
|
|
1347
|
-
}
|
|
1348
|
-
/** Gets the position of the vertical scrollbar.
|
|
1349
|
-
* @returns {number}
|
|
1350
|
-
*/
|
|
1351
|
-
getVerticalScrollValue() {
|
|
1352
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1353
|
-
const getResultOnRender = () => {
|
|
1354
|
-
return new Promise(resolve => {
|
|
1355
|
-
this.nativeElement.whenRendered(() => {
|
|
1356
|
-
const result = this.nativeElement.getVerticalScrollValue();
|
|
1357
|
-
resolve(result);
|
|
1358
|
-
});
|
|
1359
|
-
});
|
|
1360
|
-
};
|
|
1361
|
-
const result = yield getResultOnRender();
|
|
1362
|
-
return result;
|
|
1363
|
-
});
|
|
1364
|
-
}
|
|
1365
|
-
/** Gets the maximum position of the horizontal scrollbar. You can use this method in combination with the setHorizontalScrollValue to apply a new scroll position.
|
|
1366
|
-
* @returns {number}
|
|
1367
|
-
*/
|
|
1368
|
-
getHorizontalScrollMax() {
|
|
1369
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1370
|
-
const getResultOnRender = () => {
|
|
1371
|
-
return new Promise(resolve => {
|
|
1372
|
-
this.nativeElement.whenRendered(() => {
|
|
1373
|
-
const result = this.nativeElement.getHorizontalScrollMax();
|
|
1374
|
-
resolve(result);
|
|
1375
|
-
});
|
|
1376
|
-
});
|
|
1377
|
-
};
|
|
1378
|
-
const result = yield getResultOnRender();
|
|
1379
|
-
return result;
|
|
1380
|
-
});
|
|
1381
|
-
}
|
|
1382
|
-
/** Gets the position of the horizontal scrollbar.
|
|
1383
|
-
* @returns {number}
|
|
1384
|
-
*/
|
|
1385
|
-
getHorizontalScrollValue() {
|
|
1386
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1387
|
-
const getResultOnRender = () => {
|
|
1388
|
-
return new Promise(resolve => {
|
|
1389
|
-
this.nativeElement.whenRendered(() => {
|
|
1390
|
-
const result = this.nativeElement.getHorizontalScrollValue();
|
|
1391
|
-
resolve(result);
|
|
1392
|
-
});
|
|
1393
|
-
});
|
|
1394
|
-
};
|
|
1395
|
-
const result = yield getResultOnRender();
|
|
1396
|
-
return result;
|
|
1397
|
-
});
|
|
1398
|
-
}
|
|
1399
|
-
/** Gets the columns array. Each item in the array contains the column properties which are dynamically set by the user interaction and the columns initialization data properties such as: 'label', 'dataField', 'dataType', 'visible'.
|
|
1400
|
-
* @returns {any}
|
|
1401
|
-
*/
|
|
1402
|
-
getColumns() {
|
|
1403
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1404
|
-
const getResultOnRender = () => {
|
|
1405
|
-
return new Promise(resolve => {
|
|
1406
|
-
this.nativeElement.whenRendered(() => {
|
|
1407
|
-
const result = this.nativeElement.getColumns();
|
|
1408
|
-
resolve(result);
|
|
1409
|
-
});
|
|
1410
|
-
});
|
|
1411
|
-
};
|
|
1412
|
-
const result = yield getResultOnRender();
|
|
1413
|
-
return result;
|
|
1414
|
-
});
|
|
1415
|
-
}
|
|
1416
|
-
/** Gets the editing cell(s), when the grid is editing.
|
|
1417
|
-
* @returns {any[]}
|
|
1418
|
-
*/
|
|
1419
|
-
getEditCells() {
|
|
1420
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1421
|
-
const getResultOnRender = () => {
|
|
1422
|
-
return new Promise(resolve => {
|
|
1423
|
-
this.nativeElement.whenRendered(() => {
|
|
1424
|
-
const result = this.nativeElement.getEditCells();
|
|
1425
|
-
resolve(result);
|
|
1426
|
-
});
|
|
1427
|
-
});
|
|
1428
|
-
};
|
|
1429
|
-
const result = yield getResultOnRender();
|
|
1430
|
-
return result;
|
|
1431
|
-
});
|
|
1432
|
-
}
|
|
1433
|
-
/** Gets the groups array.
|
|
1434
|
-
* @returns {any[]}
|
|
1435
|
-
*/
|
|
1436
|
-
getGroups() {
|
|
1437
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1438
|
-
const getResultOnRender = () => {
|
|
1439
|
-
return new Promise(resolve => {
|
|
1440
|
-
this.nativeElement.whenRendered(() => {
|
|
1441
|
-
const result = this.nativeElement.getGroups();
|
|
1442
|
-
resolve(result);
|
|
1443
|
-
});
|
|
1444
|
-
});
|
|
1445
|
-
};
|
|
1446
|
-
const result = yield getResultOnRender();
|
|
1447
|
-
return result;
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
/** Gets an array of columns with applied sorting. Each member in the array is with column's data field used as a key and 'sortOrder' and 'sortIndex' as a value.
|
|
1451
|
-
* @returns {{[dataField: string]: { sortOrder: string, sortIndex: number }}}
|
|
1452
|
-
*/
|
|
1453
|
-
getSortedColumns() {
|
|
1454
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1455
|
-
const getResultOnRender = () => {
|
|
1456
|
-
return new Promise(resolve => {
|
|
1457
|
-
this.nativeElement.whenRendered(() => {
|
|
1458
|
-
const result = this.nativeElement.getSortedColumns();
|
|
1459
|
-
resolve(result);
|
|
1460
|
-
});
|
|
1461
|
-
});
|
|
1462
|
-
};
|
|
1463
|
-
const result = yield getResultOnRender();
|
|
1464
|
-
return result;
|
|
1465
|
-
});
|
|
1466
|
-
}
|
|
1467
|
-
/** Gets the selection.
|
|
1468
|
-
* @returns {any}
|
|
1469
|
-
*/
|
|
1470
|
-
getSelection() {
|
|
1471
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1472
|
-
const getResultOnRender = () => {
|
|
1473
|
-
return new Promise(resolve => {
|
|
1474
|
-
this.nativeElement.whenRendered(() => {
|
|
1475
|
-
const result = this.nativeElement.getSelection();
|
|
1476
|
-
resolve(result);
|
|
1477
|
-
});
|
|
1478
|
-
});
|
|
1479
|
-
};
|
|
1480
|
-
const result = yield getResultOnRender();
|
|
1481
|
-
return result;
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
/** Gets an Array where each item is an Array of row id and row data. If the Grid is used in virtual mode, the row data parameter is empty object, because the data is loaded on demand.
|
|
1485
|
-
* @returns {any[]}
|
|
1486
|
-
*/
|
|
1487
|
-
getSelectedRows() {
|
|
1488
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1489
|
-
const getResultOnRender = () => {
|
|
1490
|
-
return new Promise(resolve => {
|
|
1491
|
-
this.nativeElement.whenRendered(() => {
|
|
1492
|
-
const result = this.nativeElement.getSelectedRows();
|
|
1493
|
-
resolve(result);
|
|
1494
|
-
});
|
|
1495
|
-
});
|
|
1496
|
-
};
|
|
1497
|
-
const result = yield getResultOnRender();
|
|
1498
|
-
return result;
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
/** Gets the selected row ids.
|
|
1502
|
-
* @returns {any[]}
|
|
1503
|
-
*/
|
|
1504
|
-
getSelectedRowIds() {
|
|
1505
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1506
|
-
const getResultOnRender = () => {
|
|
1507
|
-
return new Promise(resolve => {
|
|
1508
|
-
this.nativeElement.whenRendered(() => {
|
|
1509
|
-
const result = this.nativeElement.getSelectedRowIds();
|
|
1510
|
-
resolve(result);
|
|
1511
|
-
});
|
|
1512
|
-
});
|
|
1513
|
-
};
|
|
1514
|
-
const result = yield getResultOnRender();
|
|
1515
|
-
return result;
|
|
1516
|
-
});
|
|
1517
|
-
}
|
|
1518
|
-
/** Gets the selected row indexes.
|
|
1519
|
-
* @returns {any[]}
|
|
1520
|
-
*/
|
|
1521
|
-
getSelectedRowIndexes() {
|
|
1522
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1523
|
-
const getResultOnRender = () => {
|
|
1524
|
-
return new Promise(resolve => {
|
|
1525
|
-
this.nativeElement.whenRendered(() => {
|
|
1526
|
-
const result = this.nativeElement.getSelectedRowIndexes();
|
|
1527
|
-
resolve(result);
|
|
1528
|
-
});
|
|
1529
|
-
});
|
|
1530
|
-
};
|
|
1531
|
-
const result = yield getResultOnRender();
|
|
1532
|
-
return result;
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
/** Gets the selected cells. The method returns an array of cell. Each cell is an array with row id, column data field and cell value.
|
|
1536
|
-
* @returns {any[]}
|
|
1537
|
-
*/
|
|
1538
|
-
getSelectedCells() {
|
|
1539
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1540
|
-
const getResultOnRender = () => {
|
|
1541
|
-
return new Promise(resolve => {
|
|
1542
|
-
this.nativeElement.whenRendered(() => {
|
|
1543
|
-
const result = this.nativeElement.getSelectedCells();
|
|
1544
|
-
resolve(result);
|
|
1545
|
-
});
|
|
1546
|
-
});
|
|
1547
|
-
};
|
|
1548
|
-
const result = yield getResultOnRender();
|
|
1549
|
-
return result;
|
|
1550
|
-
});
|
|
1551
|
-
}
|
|
1552
|
-
/** Gets an array of columns with applied filters.
|
|
1553
|
-
* @returns {any}
|
|
1554
|
-
*/
|
|
1555
|
-
getFilteredColumns() {
|
|
1556
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1557
|
-
const getResultOnRender = () => {
|
|
1558
|
-
return new Promise(resolve => {
|
|
1559
|
-
this.nativeElement.whenRendered(() => {
|
|
1560
|
-
const result = this.nativeElement.getFilteredColumns();
|
|
1561
|
-
resolve(result);
|
|
1562
|
-
});
|
|
1563
|
-
});
|
|
1564
|
-
};
|
|
1565
|
-
const result = yield getResultOnRender();
|
|
1566
|
-
return result;
|
|
1567
|
-
});
|
|
1568
|
-
}
|
|
1569
|
-
/** Gets an array of rows, which are visible and match the applied filter.
|
|
1570
|
-
* @returns {any}
|
|
1571
|
-
*/
|
|
1572
|
-
getVisibleRows() {
|
|
1573
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1574
|
-
const getResultOnRender = () => {
|
|
1575
|
-
return new Promise(resolve => {
|
|
1576
|
-
this.nativeElement.whenRendered(() => {
|
|
1577
|
-
const result = this.nativeElement.getVisibleRows();
|
|
1578
|
-
resolve(result);
|
|
1579
|
-
});
|
|
1580
|
-
});
|
|
1581
|
-
};
|
|
1582
|
-
const result = yield getResultOnRender();
|
|
1583
|
-
return result;
|
|
1584
|
-
});
|
|
1585
|
-
}
|
|
1586
|
-
/** Gets the result of the getVisibleRows or the rows hierarchy, when the Grid is in TreeGrid/Grouping mode.
|
|
1587
|
-
* @returns {any}
|
|
1588
|
-
*/
|
|
1589
|
-
getViewRows() {
|
|
1590
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1591
|
-
const getResultOnRender = () => {
|
|
1592
|
-
return new Promise(resolve => {
|
|
1593
|
-
this.nativeElement.whenRendered(() => {
|
|
1594
|
-
const result = this.nativeElement.getViewRows();
|
|
1595
|
-
resolve(result);
|
|
1596
|
-
});
|
|
1597
|
-
});
|
|
1598
|
-
};
|
|
1599
|
-
const result = yield getResultOnRender();
|
|
1600
|
-
return result;
|
|
1601
|
-
});
|
|
1602
|
-
}
|
|
1603
|
-
/** Gets a JSON object with the following fields: 'sort', 'filter', 'groups', 'paging', 'selectedCells', 'selectedrows'.
|
|
1604
|
-
* @returns {any}
|
|
1605
|
-
*/
|
|
1606
|
-
getState() {
|
|
1607
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1608
|
-
const getResultOnRender = () => {
|
|
1609
|
-
return new Promise(resolve => {
|
|
1610
|
-
this.nativeElement.whenRendered(() => {
|
|
1611
|
-
const result = this.nativeElement.getState();
|
|
1612
|
-
resolve(result);
|
|
1613
|
-
});
|
|
1614
|
-
});
|
|
1615
|
-
};
|
|
1616
|
-
const result = yield getResultOnRender();
|
|
1617
|
-
return result;
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
/** Gets the changes from the batch edit.
|
|
1621
|
-
* @returns {{ upDated: [{ id: string, dataField: string, oldValue: Object, newValue: Object }], deleted: [{id: string, data: Object}], added: [{id: string, data: Object}] }}
|
|
1622
|
-
*/
|
|
1623
|
-
getBatchEditChanges() {
|
|
1624
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1625
|
-
const getResultOnRender = () => {
|
|
1626
|
-
return new Promise(resolve => {
|
|
1627
|
-
this.nativeElement.whenRendered(() => {
|
|
1628
|
-
const result = this.nativeElement.getBatchEditChanges();
|
|
1629
|
-
resolve(result);
|
|
1630
|
-
});
|
|
1631
|
-
});
|
|
1632
|
-
};
|
|
1633
|
-
const result = yield getResultOnRender();
|
|
1634
|
-
return result;
|
|
1635
|
-
});
|
|
1636
|
-
}
|
|
1637
|
-
/** Gets a value of a cell.
|
|
1638
|
-
* @param {string | number} rowId. row bound id
|
|
1639
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1640
|
-
* @returns {any}
|
|
1641
|
-
*/
|
|
1642
|
-
getCellValue(rowId, dataField) {
|
|
1643
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1644
|
-
const getResultOnRender = () => {
|
|
1645
|
-
return new Promise(resolve => {
|
|
1646
|
-
this.nativeElement.whenRendered(() => {
|
|
1647
|
-
const result = this.nativeElement.getCellValue(rowId, dataField);
|
|
1648
|
-
resolve(result);
|
|
1649
|
-
});
|
|
1650
|
-
});
|
|
1651
|
-
};
|
|
1652
|
-
const result = yield getResultOnRender();
|
|
1653
|
-
return result;
|
|
1654
|
-
});
|
|
1655
|
-
}
|
|
1656
|
-
/** Gets a column. Returns a Grid column object.
|
|
1657
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1658
|
-
* @returns {GridColumn}
|
|
1659
|
-
*/
|
|
1660
|
-
getColumn(dataField) {
|
|
1661
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1662
|
-
const getResultOnRender = () => {
|
|
1663
|
-
return new Promise(resolve => {
|
|
1664
|
-
this.nativeElement.whenRendered(() => {
|
|
1665
|
-
const result = this.nativeElement.getColumn(dataField);
|
|
1666
|
-
resolve(result);
|
|
1667
|
-
});
|
|
1668
|
-
});
|
|
1669
|
-
};
|
|
1670
|
-
const result = yield getResultOnRender();
|
|
1671
|
-
return result;
|
|
1672
|
-
});
|
|
1673
|
-
}
|
|
1674
|
-
/** Gets a value of a column.
|
|
1675
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1676
|
-
* @param {string} propertyName. The property name.
|
|
1677
|
-
* @returns {any}
|
|
1678
|
-
*/
|
|
1679
|
-
getColumnProperty(dataField, propertyName) {
|
|
1680
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1681
|
-
const getResultOnRender = () => {
|
|
1682
|
-
return new Promise(resolve => {
|
|
1683
|
-
this.nativeElement.whenRendered(() => {
|
|
1684
|
-
const result = this.nativeElement.getColumnProperty(dataField, propertyName);
|
|
1685
|
-
resolve(result);
|
|
1686
|
-
});
|
|
1687
|
-
});
|
|
1688
|
-
};
|
|
1689
|
-
const result = yield getResultOnRender();
|
|
1690
|
-
return result;
|
|
1691
|
-
});
|
|
1692
|
-
}
|
|
1693
|
-
/** Gets a value of a row.
|
|
1694
|
-
* @param {string | number} rowId. row bound id
|
|
1695
|
-
* @param {string} propertyName. The property name.
|
|
1696
|
-
* @returns {any}
|
|
1697
|
-
*/
|
|
1698
|
-
getRowProperty(rowId, propertyName) {
|
|
1699
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1700
|
-
const getResultOnRender = () => {
|
|
1701
|
-
return new Promise(resolve => {
|
|
1702
|
-
this.nativeElement.whenRendered(() => {
|
|
1703
|
-
const result = this.nativeElement.getRowProperty(rowId, propertyName);
|
|
1704
|
-
resolve(result);
|
|
1705
|
-
});
|
|
1706
|
-
});
|
|
1707
|
-
};
|
|
1708
|
-
const result = yield getResultOnRender();
|
|
1709
|
-
return result;
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
/** Gets a row. Returns a Grid row object.
|
|
1713
|
-
* @param {string | number} rowId. row bound id
|
|
1714
|
-
* @returns {GridRow}
|
|
1715
|
-
*/
|
|
1716
|
-
getRow(rowId) {
|
|
1717
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1718
|
-
const getResultOnRender = () => {
|
|
1719
|
-
return new Promise(resolve => {
|
|
1720
|
-
this.nativeElement.whenRendered(() => {
|
|
1721
|
-
const result = this.nativeElement.getRow(rowId);
|
|
1722
|
-
resolve(result);
|
|
1723
|
-
});
|
|
1724
|
-
});
|
|
1725
|
-
};
|
|
1726
|
-
const result = yield getResultOnRender();
|
|
1727
|
-
return result;
|
|
1728
|
-
});
|
|
1729
|
-
}
|
|
1730
|
-
/** Gets a row by its index. Returns a Grid row object.
|
|
1731
|
-
* @param {number} rowIndex. row bound index
|
|
1732
|
-
* @returns {GridRow}
|
|
1733
|
-
*/
|
|
1734
|
-
getRowByIndex(rowIndex) {
|
|
1735
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1736
|
-
const getResultOnRender = () => {
|
|
1737
|
-
return new Promise(resolve => {
|
|
1738
|
-
this.nativeElement.whenRendered(() => {
|
|
1739
|
-
const result = this.nativeElement.getRowByIndex(rowIndex);
|
|
1740
|
-
resolve(result);
|
|
1741
|
-
});
|
|
1742
|
-
});
|
|
1743
|
-
};
|
|
1744
|
-
const result = yield getResultOnRender();
|
|
1745
|
-
return result;
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
/** Gets the Data source data associated to the row.
|
|
1749
|
-
* @param {string | number} rowId. row bound id
|
|
1750
|
-
* @returns {any}
|
|
1751
|
-
*/
|
|
1752
|
-
getRowData(rowId) {
|
|
1753
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1754
|
-
const getResultOnRender = () => {
|
|
1755
|
-
return new Promise(resolve => {
|
|
1756
|
-
this.nativeElement.whenRendered(() => {
|
|
1757
|
-
const result = this.nativeElement.getRowData(rowId);
|
|
1758
|
-
resolve(result);
|
|
1759
|
-
});
|
|
1760
|
-
});
|
|
1761
|
-
};
|
|
1762
|
-
const result = yield getResultOnRender();
|
|
1763
|
-
return result;
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
/** Gets the Row's id by a row index.
|
|
1767
|
-
* @param {number} rowIndex. row index
|
|
1768
|
-
* @returns {string | number}
|
|
1769
|
-
*/
|
|
1770
|
-
getRowId(rowIndex) {
|
|
1771
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1772
|
-
const getResultOnRender = () => {
|
|
1773
|
-
return new Promise(resolve => {
|
|
1774
|
-
this.nativeElement.whenRendered(() => {
|
|
1775
|
-
const result = this.nativeElement.getRowId(rowIndex);
|
|
1776
|
-
resolve(result);
|
|
1777
|
-
});
|
|
1778
|
-
});
|
|
1779
|
-
};
|
|
1780
|
-
const result = yield getResultOnRender();
|
|
1781
|
-
return result;
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
/** Gets whether a column's drop-down menu is opened.
|
|
1785
|
-
* @returns {boolean}
|
|
1786
|
-
*/
|
|
1787
|
-
hasMenu() {
|
|
1788
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1789
|
-
const getResultOnRender = () => {
|
|
1790
|
-
return new Promise(resolve => {
|
|
1791
|
-
this.nativeElement.whenRendered(() => {
|
|
1792
|
-
const result = this.nativeElement.hasMenu();
|
|
1793
|
-
resolve(result);
|
|
1794
|
-
});
|
|
1795
|
-
});
|
|
1796
|
-
};
|
|
1797
|
-
const result = yield getResultOnRender();
|
|
1798
|
-
return result;
|
|
1799
|
-
});
|
|
1800
|
-
}
|
|
1801
|
-
/** This method returns true, if any rows in the Grid are selected.
|
|
1802
|
-
* @returns {boolean}
|
|
1803
|
-
*/
|
|
1804
|
-
hasSelectedRows() {
|
|
1805
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1806
|
-
const getResultOnRender = () => {
|
|
1807
|
-
return new Promise(resolve => {
|
|
1808
|
-
this.nativeElement.whenRendered(() => {
|
|
1809
|
-
const result = this.nativeElement.hasSelectedRows();
|
|
1810
|
-
resolve(result);
|
|
1811
|
-
});
|
|
1812
|
-
});
|
|
1813
|
-
};
|
|
1814
|
-
const result = yield getResultOnRender();
|
|
1815
|
-
return result;
|
|
1816
|
-
});
|
|
1817
|
-
}
|
|
1818
|
-
/** Hides the Details of a Row, when row details are enabled.
|
|
1819
|
-
* @param {string | number} rowId. row bound id
|
|
1820
|
-
*/
|
|
1821
|
-
hideDetail(rowId) {
|
|
1822
|
-
if (this.nativeElement.isRendered) {
|
|
1823
|
-
this.nativeElement.hideDetail(rowId);
|
|
1824
|
-
}
|
|
1825
|
-
else {
|
|
1826
|
-
this.nativeElement.whenRendered(() => {
|
|
1827
|
-
this.nativeElement.hideDetail(rowId);
|
|
1828
|
-
});
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
/** Highlights a column. Highlights a Grid column.
|
|
1832
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1833
|
-
*/
|
|
1834
|
-
highlightColumn(dataField) {
|
|
1835
|
-
if (this.nativeElement.isRendered) {
|
|
1836
|
-
this.nativeElement.highlightColumn(dataField);
|
|
1837
|
-
}
|
|
1838
|
-
else {
|
|
1839
|
-
this.nativeElement.whenRendered(() => {
|
|
1840
|
-
this.nativeElement.highlightColumn(dataField);
|
|
1841
|
-
});
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
/** Highlights a cell. Calling the method a second time toggle the highlight state.
|
|
1845
|
-
* @param {string | number} rowId. row bound id
|
|
1846
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1847
|
-
* @param {string} className?. CSS Class Name
|
|
1848
|
-
*/
|
|
1849
|
-
highlightCell(rowId, dataField, className) {
|
|
1850
|
-
if (this.nativeElement.isRendered) {
|
|
1851
|
-
this.nativeElement.highlightCell(rowId, dataField, className);
|
|
1852
|
-
}
|
|
1853
|
-
else {
|
|
1854
|
-
this.nativeElement.whenRendered(() => {
|
|
1855
|
-
this.nativeElement.highlightCell(rowId, dataField, className);
|
|
1856
|
-
});
|
|
1857
|
-
}
|
|
1858
|
-
}
|
|
1859
|
-
/** Highlights a row. Calling the method a second time toggle the highlight state.
|
|
1860
|
-
* @param {string | number} rowId. row bound id
|
|
1861
|
-
* @param {string} className?. CSS Class Name
|
|
1862
|
-
*/
|
|
1863
|
-
highlightRow(rowId, className) {
|
|
1864
|
-
if (this.nativeElement.isRendered) {
|
|
1865
|
-
this.nativeElement.highlightRow(rowId, className);
|
|
1866
|
-
}
|
|
1867
|
-
else {
|
|
1868
|
-
this.nativeElement.whenRendered(() => {
|
|
1869
|
-
this.nativeElement.highlightRow(rowId, className);
|
|
1870
|
-
});
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
/** Inserts a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
1874
|
-
* @param {any} data. row data matching the data source
|
|
1875
|
-
* @param {number} index?. Determines the insert index. The default value is the last index.
|
|
1876
|
-
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the new row is added. The callback's argument is the new row.
|
|
1877
|
-
*/
|
|
1878
|
-
insertRow(data, index, callback) {
|
|
1879
|
-
if (this.nativeElement.isRendered) {
|
|
1880
|
-
this.nativeElement.insertRow(data, index, callback);
|
|
1881
|
-
}
|
|
1882
|
-
else {
|
|
1883
|
-
this.nativeElement.whenRendered(() => {
|
|
1884
|
-
this.nativeElement.insertRow(data, index, callback);
|
|
1885
|
-
});
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
/** Opens a column drop-down menu.
|
|
1889
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1890
|
-
*/
|
|
1891
|
-
openMenu(dataField) {
|
|
1892
|
-
if (this.nativeElement.isRendered) {
|
|
1893
|
-
this.nativeElement.openMenu(dataField);
|
|
1894
|
-
}
|
|
1895
|
-
else {
|
|
1896
|
-
this.nativeElement.whenRendered(() => {
|
|
1897
|
-
this.nativeElement.openMenu(dataField);
|
|
1898
|
-
});
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
/** Opens a context menu. Note that context menu should be enabled.
|
|
1902
|
-
* @param {number} left. Left Position.
|
|
1903
|
-
* @param {number} top. Top Position.
|
|
1904
|
-
*/
|
|
1905
|
-
openContextMenu(left, top) {
|
|
1906
|
-
if (this.nativeElement.isRendered) {
|
|
1907
|
-
this.nativeElement.openContextMenu(left, top);
|
|
1908
|
-
}
|
|
1909
|
-
else {
|
|
1910
|
-
this.nativeElement.whenRendered(() => {
|
|
1911
|
-
this.nativeElement.openContextMenu(left, top);
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
/** Prints the Grid data. The method uses the options of the dataExport property. When printed, the Grid will not display any scrollbars so all rows and columns will be displayed. The grid will auto resize width and height to fit all contents. To customize the printing options, you can use the dataExport property.
|
|
1916
|
-
*/
|
|
1917
|
-
print() {
|
|
1918
|
-
if (this.nativeElement.isRendered) {
|
|
1919
|
-
this.nativeElement.print();
|
|
1920
|
-
}
|
|
1921
|
-
else {
|
|
1922
|
-
this.nativeElement.whenRendered(() => {
|
|
1923
|
-
this.nativeElement.print();
|
|
1924
|
-
});
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
/** Renders the grid. This method will make a full-refresh like in the initial Grid creation. It will create Rows, Columns and Cells HTML Elements and then refresh the Grid layout.
|
|
1928
|
-
*/
|
|
1929
|
-
refresh() {
|
|
1930
|
-
if (this.nativeElement.isRendered) {
|
|
1931
|
-
this.nativeElement.refresh();
|
|
1932
|
-
}
|
|
1933
|
-
else {
|
|
1934
|
-
this.nativeElement.whenRendered(() => {
|
|
1935
|
-
this.nativeElement.refresh();
|
|
1936
|
-
});
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
/** Refreshes the grid with the current property values. This method will refresh the Grid layout.
|
|
1940
|
-
*/
|
|
1941
|
-
refreshView() {
|
|
1942
|
-
if (this.nativeElement.isRendered) {
|
|
1943
|
-
this.nativeElement.refreshView();
|
|
1944
|
-
}
|
|
1945
|
-
else {
|
|
1946
|
-
this.nativeElement.whenRendered(() => {
|
|
1947
|
-
this.nativeElement.refreshView();
|
|
1948
|
-
});
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
/** Refreshes the grid cells in view. The method is useful for live-updates of cell values.
|
|
1952
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1953
|
-
* @param {boolean} refreshFilters?. Set this to false, if you need to make multiple removeFilter calls.
|
|
1954
|
-
*/
|
|
1955
|
-
removeFilter(dataField, refreshFilters) {
|
|
1956
|
-
if (this.nativeElement.isRendered) {
|
|
1957
|
-
this.nativeElement.removeFilter(dataField, refreshFilters);
|
|
1958
|
-
}
|
|
1959
|
-
else {
|
|
1960
|
-
this.nativeElement.whenRendered(() => {
|
|
1961
|
-
this.nativeElement.removeFilter(dataField, refreshFilters);
|
|
1962
|
-
});
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
/** Removes a column filter.
|
|
1966
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1967
|
-
*/
|
|
1968
|
-
removeGroup(dataField) {
|
|
1969
|
-
if (this.nativeElement.isRendered) {
|
|
1970
|
-
this.nativeElement.removeGroup(dataField);
|
|
1971
|
-
}
|
|
1972
|
-
else {
|
|
1973
|
-
this.nativeElement.whenRendered(() => {
|
|
1974
|
-
this.nativeElement.removeGroup(dataField);
|
|
1975
|
-
});
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
/** Removes a group by data field. This method will remove a group to the Grid when grouping is enabled.
|
|
1979
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
1980
|
-
*/
|
|
1981
|
-
removeSort(dataField) {
|
|
1982
|
-
if (this.nativeElement.isRendered) {
|
|
1983
|
-
this.nativeElement.removeSort(dataField);
|
|
1984
|
-
}
|
|
1985
|
-
else {
|
|
1986
|
-
this.nativeElement.whenRendered(() => {
|
|
1987
|
-
this.nativeElement.removeSort(dataField);
|
|
1988
|
-
});
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
/** Removes a sorting by data field. This method will remove a sorting from a Grid column.
|
|
1992
|
-
*/
|
|
1993
|
-
refreshSort() {
|
|
1994
|
-
if (this.nativeElement.isRendered) {
|
|
1995
|
-
this.nativeElement.refreshSort();
|
|
1996
|
-
}
|
|
1997
|
-
else {
|
|
1998
|
-
this.nativeElement.whenRendered(() => {
|
|
1999
|
-
this.nativeElement.refreshSort();
|
|
2000
|
-
});
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
/** Re-sorts the Grid by using the already applied column sortings and re-renders the Grid.
|
|
2004
|
-
*/
|
|
2005
|
-
revertBatchEdit() {
|
|
2006
|
-
if (this.nativeElement.isRendered) {
|
|
2007
|
-
this.nativeElement.revertBatchEdit();
|
|
2008
|
-
}
|
|
2009
|
-
else {
|
|
2010
|
-
this.nativeElement.whenRendered(() => {
|
|
2011
|
-
this.nativeElement.revertBatchEdit();
|
|
2012
|
-
});
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
/** Reverts the batch edit changes. This method cancels all changes made by the end-user.
|
|
2016
|
-
* @param {string | number} dataField. The data field or column index of the first grid column.
|
|
2017
|
-
* @param {string | number} referenceDataField. The data field or column index of the second grid column.
|
|
2018
|
-
* @param {boolean} insertAfter?. Determines whether to insert the first column after the reference column.
|
|
2019
|
-
*/
|
|
2020
|
-
reorderColumns(dataField, referenceDataField, insertAfter) {
|
|
2021
|
-
if (this.nativeElement.isRendered) {
|
|
2022
|
-
this.nativeElement.reorderColumns(dataField, referenceDataField, insertAfter);
|
|
2023
|
-
}
|
|
2024
|
-
else {
|
|
2025
|
-
this.nativeElement.whenRendered(() => {
|
|
2026
|
-
this.nativeElement.reorderColumns(dataField, referenceDataField, insertAfter);
|
|
2027
|
-
});
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
/** Reorders two DataGrid columns.
|
|
2031
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
2032
|
-
* @param {string | null} sortOrder. column's sort order. Use 'asc', 'desc' or null.
|
|
2033
|
-
*/
|
|
2034
|
-
sortBy(dataField, sortOrder) {
|
|
2035
|
-
if (this.nativeElement.isRendered) {
|
|
2036
|
-
this.nativeElement.sortBy(dataField, sortOrder);
|
|
2037
|
-
}
|
|
2038
|
-
else {
|
|
2039
|
-
this.nativeElement.whenRendered(() => {
|
|
2040
|
-
this.nativeElement.sortBy(dataField, sortOrder);
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
/** Sorts the Grid by a data field. This method will add or remove sorting, when sorting is enabled. To remove the sorting, use 'null' for the sortOrder parameter.
|
|
2045
|
-
* @param {string | number} dataField. The data field or column index of the first grid column.
|
|
2046
|
-
* @param {string | number} referenceDataField. The data field or column index of the second grid column.
|
|
2047
|
-
*/
|
|
2048
|
-
swapColumns(dataField, referenceDataField) {
|
|
2049
|
-
if (this.nativeElement.isRendered) {
|
|
2050
|
-
this.nativeElement.swapColumns(dataField, referenceDataField);
|
|
2051
|
-
}
|
|
2052
|
-
else {
|
|
2053
|
-
this.nativeElement.whenRendered(() => {
|
|
2054
|
-
this.nativeElement.swapColumns(dataField, referenceDataField);
|
|
2055
|
-
});
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
/** Swaps two DataGrid columns.
|
|
2059
|
-
*/
|
|
2060
|
-
saveBatchEdit() {
|
|
2061
|
-
if (this.nativeElement.isRendered) {
|
|
2062
|
-
this.nativeElement.saveBatchEdit();
|
|
2063
|
-
}
|
|
2064
|
-
else {
|
|
2065
|
-
this.nativeElement.whenRendered(() => {
|
|
2066
|
-
this.nativeElement.saveBatchEdit();
|
|
2067
|
-
});
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
/** Saves the batch edit changes. This method confirms the editing changes made by the end-user.
|
|
2071
|
-
* @param {string | number} rowId. row bound id
|
|
2072
|
-
* @param {string} dataField?. column bound data field
|
|
2073
|
-
*/
|
|
2074
|
-
select(rowId, dataField) {
|
|
2075
|
-
if (this.nativeElement.isRendered) {
|
|
2076
|
-
this.nativeElement.select(rowId, dataField);
|
|
2077
|
-
}
|
|
2078
|
-
else {
|
|
2079
|
-
this.nativeElement.whenRendered(() => {
|
|
2080
|
-
this.nativeElement.select(rowId, dataField);
|
|
2081
|
-
});
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
/** Selects a row, cell or column.
|
|
2085
|
-
* @param {string | number} rowId. row bound id
|
|
2086
|
-
* @param {string} dataField. column bound data field
|
|
2087
|
-
* @param {string | number} endRowId. row bound id
|
|
2088
|
-
* @param {string} endDataField. column bound data field
|
|
2089
|
-
*/
|
|
2090
|
-
selectRange(rowId, dataField, endRowId, endDataField) {
|
|
2091
|
-
if (this.nativeElement.isRendered) {
|
|
2092
|
-
this.nativeElement.selectRange(rowId, dataField, endRowId, endDataField);
|
|
2093
|
-
}
|
|
2094
|
-
else {
|
|
2095
|
-
this.nativeElement.whenRendered(() => {
|
|
2096
|
-
this.nativeElement.selectRange(rowId, dataField, endRowId, endDataField);
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
/** Selects a range of rows, cells or columns. The result of the method depends on the selection configuration of the Grid.
|
|
2101
|
-
* @param {string | number} rowId. row bound id
|
|
2102
|
-
* @param {string | number} endRowId. row bound id
|
|
2103
|
-
*/
|
|
2104
|
-
selectRowsRange(rowId, endRowId) {
|
|
2105
|
-
if (this.nativeElement.isRendered) {
|
|
2106
|
-
this.nativeElement.selectRowsRange(rowId, endRowId);
|
|
2107
|
-
}
|
|
2108
|
-
else {
|
|
2109
|
-
this.nativeElement.whenRendered(() => {
|
|
2110
|
-
this.nativeElement.selectRowsRange(rowId, endRowId);
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
/** Selects a range of rows.
|
|
2115
|
-
* @param {(string | number)[]} rowId. Array of row ids
|
|
2116
|
-
*/
|
|
2117
|
-
selectRows(rowId) {
|
|
2118
|
-
if (this.nativeElement.isRendered) {
|
|
2119
|
-
this.nativeElement.selectRows(rowId);
|
|
2120
|
-
}
|
|
2121
|
-
else {
|
|
2122
|
-
this.nativeElement.whenRendered(() => {
|
|
2123
|
-
this.nativeElement.selectRows(rowId);
|
|
2124
|
-
});
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
/** Selects multiple rows by their ids.
|
|
2128
|
-
*/
|
|
2129
|
-
selectAllRows() {
|
|
2130
|
-
if (this.nativeElement.isRendered) {
|
|
2131
|
-
this.nativeElement.selectAllRows();
|
|
2132
|
-
}
|
|
2133
|
-
else {
|
|
2134
|
-
this.nativeElement.whenRendered(() => {
|
|
2135
|
-
this.nativeElement.selectAllRows();
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
/** Selects all rows.
|
|
2140
|
-
* @param {number[]} rowIndex. Array of row indexes
|
|
2141
|
-
*/
|
|
2142
|
-
selectRowsByIndex(rowIndex) {
|
|
2143
|
-
if (this.nativeElement.isRendered) {
|
|
2144
|
-
this.nativeElement.selectRowsByIndex(rowIndex);
|
|
2145
|
-
}
|
|
2146
|
-
else {
|
|
2147
|
-
this.nativeElement.whenRendered(() => {
|
|
2148
|
-
this.nativeElement.selectRowsByIndex(rowIndex);
|
|
2149
|
-
});
|
|
2150
|
-
}
|
|
2151
|
-
}
|
|
2152
|
-
/** Selects multiple rows by their index.
|
|
2153
|
-
* @param {string} query. Search query
|
|
2154
|
-
* @param {string} dataField?. Column data field.
|
|
2155
|
-
* @param {string} condition?. Conditions which you can use in the expressions: '=', 'EQUAL','<>', 'NOT_EQUAL', '!=', '<', 'LESS_THAN','>', 'GREATER_THAN', '<=', 'LESS_THAN_OR_EQUAL', '>=', 'GREATER_THAN_OR_EQUAL','starts with', 'STARTS_WITH','ends with', 'ENDS_WITH', '', 'EMPTY', 'CONTAINS','DOES_NOT_CONTAIN', 'NULL','NOT_NULL'
|
|
2156
|
-
*/
|
|
2157
|
-
selectRowsByQuery(query, dataField, condition) {
|
|
2158
|
-
if (this.nativeElement.isRendered) {
|
|
2159
|
-
this.nativeElement.selectRowsByQuery(query, dataField, condition);
|
|
2160
|
-
}
|
|
2161
|
-
else {
|
|
2162
|
-
this.nativeElement.whenRendered(() => {
|
|
2163
|
-
this.nativeElement.selectRowsByQuery(query, dataField, condition);
|
|
2164
|
-
});
|
|
2165
|
-
}
|
|
2166
|
-
}
|
|
2167
|
-
/** Selects rows by using a query. Example: grid.selectRowsByQuery('nancy'); selects all rows that have 'nancy' value. Example 2: grid.selectRowsByQuery('nancy, davolio'); selects all rows that have 'nancy' and 'davolio' values in the same row. Example 3: grid.selectRowsByQuery(5, 'quantity', '>'); selects all rows where the value of the 'quantity' field is > 5.
|
|
2168
|
-
* @param {(string | number)[]} rowIds. Array of row ids
|
|
2169
|
-
* @param {string[]} dataFields. Array of data fields.
|
|
2170
|
-
*/
|
|
2171
|
-
selectCells(rowIds, dataFields) {
|
|
2172
|
-
if (this.nativeElement.isRendered) {
|
|
2173
|
-
this.nativeElement.selectCells(rowIds, dataFields);
|
|
2174
|
-
}
|
|
2175
|
-
else {
|
|
2176
|
-
this.nativeElement.whenRendered(() => {
|
|
2177
|
-
this.nativeElement.selectCells(rowIds, dataFields);
|
|
2178
|
-
});
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
/** Selects multiple cells by their ids and dataFields. Example: grid.selectCells([0, 1, 2], ['firstName', 'quantity', 'date']); - selects the 'firstName', 'quantity' and 'date' cells from the first, second and third rows.
|
|
2182
|
-
* @param {string} query. Search query
|
|
2183
|
-
*/
|
|
2184
|
-
selectCellsByQuery(query) {
|
|
2185
|
-
if (this.nativeElement.isRendered) {
|
|
2186
|
-
this.nativeElement.selectCellsByQuery(query);
|
|
2187
|
-
}
|
|
2188
|
-
else {
|
|
2189
|
-
this.nativeElement.whenRendered(() => {
|
|
2190
|
-
this.nativeElement.selectCellsByQuery(query);
|
|
2191
|
-
});
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
/** Selects cells by using a query. Example: grid.selectCellsByQuery('nancy'); selects all cells that have 'nancy' value. Example 2: grid.selectCellsByQuery('nancy, davolio'); selects all cells that have 'nancy' and 'davolio' values in the same row.
|
|
2195
|
-
* @param {string | number} rowId. row bound id
|
|
2196
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
2197
|
-
* @param {string | number | Date | boolean} value. New Cell value.
|
|
2198
|
-
*/
|
|
2199
|
-
setCellValue(rowId, dataField, value) {
|
|
2200
|
-
if (this.nativeElement.isRendered) {
|
|
2201
|
-
this.nativeElement.setCellValue(rowId, dataField, value);
|
|
2202
|
-
}
|
|
2203
|
-
else {
|
|
2204
|
-
this.nativeElement.whenRendered(() => {
|
|
2205
|
-
this.nativeElement.setCellValue(rowId, dataField, value);
|
|
2206
|
-
});
|
|
2207
|
-
}
|
|
2208
|
-
}
|
|
2209
|
-
/** Sets a new value to a cell.
|
|
2210
|
-
* @param {GridColumn[]} columns. Columns array.
|
|
2211
|
-
*/
|
|
2212
|
-
setColumns(columns) {
|
|
2213
|
-
if (this.nativeElement.isRendered) {
|
|
2214
|
-
this.nativeElement.setColumns(columns);
|
|
2215
|
-
}
|
|
2216
|
-
else {
|
|
2217
|
-
this.nativeElement.whenRendered(() => {
|
|
2218
|
-
this.nativeElement.setColumns(columns);
|
|
2219
|
-
});
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
/** Sets new columns to the Grid. The grid will redraw all the column headers, and then redraw all of the rows. By using 'setColumns', the grid will compare the new columns passed as argument to the method with existing columns. The Grid will automatically create new columns, keep old columns if they already exist and remove columns which are not in the 'setColumns' method argument. The benefit of that is that the state of the column like(sort, filter, width or other) will be kept, if the column exsits after the new columns are applied.
|
|
2223
|
-
* @param {string} dataField. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
2224
|
-
* @param {string} propertyName. The column property's name.
|
|
2225
|
-
* @param {any} value. The new property value.
|
|
2226
|
-
*/
|
|
2227
|
-
setColumnProperty(dataField, propertyName, value) {
|
|
2228
|
-
if (this.nativeElement.isRendered) {
|
|
2229
|
-
this.nativeElement.setColumnProperty(dataField, propertyName, value);
|
|
2230
|
-
}
|
|
2231
|
-
else {
|
|
2232
|
-
this.nativeElement.whenRendered(() => {
|
|
2233
|
-
this.nativeElement.setColumnProperty(dataField, propertyName, value);
|
|
2234
|
-
});
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
/** Sets a property to a column.
|
|
2238
|
-
* @param {string | number} rowId. row bound id
|
|
2239
|
-
* @param {string} propertyName. The row property's name.
|
|
2240
|
-
* @param {any} value. The new property value.
|
|
2241
|
-
*/
|
|
2242
|
-
setRowProperty(rowId, propertyName, value) {
|
|
2243
|
-
if (this.nativeElement.isRendered) {
|
|
2244
|
-
this.nativeElement.setRowProperty(rowId, propertyName, value);
|
|
2245
|
-
}
|
|
2246
|
-
else {
|
|
2247
|
-
this.nativeElement.whenRendered(() => {
|
|
2248
|
-
this.nativeElement.setRowProperty(rowId, propertyName, value);
|
|
2249
|
-
});
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
/** Sets a property to a row.
|
|
2253
|
-
* @param {string | number} rowId. row bound id
|
|
2254
|
-
* @param {{background?: string, color?: string, fontSize?: string, fontFamily?: string, textDecoration?: string, fontStyle?: string, fontWeight?: string}} rowStyle. The row style object. The object may have one or all of the following properties: 'background', 'color', 'fontSize', 'fontFamily', 'textDecoration', 'fontStyle', 'fontWeight'.
|
|
2255
|
-
*/
|
|
2256
|
-
setRowStyle(rowId, rowStyle) {
|
|
2257
|
-
if (this.nativeElement.isRendered) {
|
|
2258
|
-
this.nativeElement.setRowStyle(rowId, rowStyle);
|
|
2259
|
-
}
|
|
2260
|
-
else {
|
|
2261
|
-
this.nativeElement.whenRendered(() => {
|
|
2262
|
-
this.nativeElement.setRowStyle(rowId, rowStyle);
|
|
2263
|
-
});
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
/** Sets a style to a row.
|
|
2267
|
-
* @param {string | number} rowId. row bound id
|
|
2268
|
-
* @param {string} dataField. Column bound field name.
|
|
2269
|
-
* @param {{background?: string, color?: string, fontSize?: string, fontFamily?: string, textDecoration?: string, fontStyle?: string, fontWeight?: string}} rowStyle. The cell style object. The object may have one or all of the following properties: 'background', 'color', 'fontSize', 'fontFamily', 'textDecoration', 'fontStyle', 'fontWeight'.
|
|
2270
|
-
*/
|
|
2271
|
-
setCellStyle(rowId, dataField, rowStyle) {
|
|
2272
|
-
if (this.nativeElement.isRendered) {
|
|
2273
|
-
this.nativeElement.setCellStyle(rowId, dataField, rowStyle);
|
|
2274
|
-
}
|
|
2275
|
-
else {
|
|
2276
|
-
this.nativeElement.whenRendered(() => {
|
|
2277
|
-
this.nativeElement.setCellStyle(rowId, dataField, rowStyle);
|
|
2278
|
-
});
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
/** Sets a style to a row.
|
|
2282
|
-
* @param {number} value. The new scroll position
|
|
2283
|
-
*/
|
|
2284
|
-
setVerticalScrollValue(value) {
|
|
2285
|
-
if (this.nativeElement.isRendered) {
|
|
2286
|
-
this.nativeElement.setVerticalScrollValue(value);
|
|
2287
|
-
}
|
|
2288
|
-
else {
|
|
2289
|
-
this.nativeElement.whenRendered(() => {
|
|
2290
|
-
this.nativeElement.setVerticalScrollValue(value);
|
|
2291
|
-
});
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
/** Sets the position of the vertical scrollbar. You can use this method in combination with the getVerticalScrollValue and getVerticalScrollMax.
|
|
2295
|
-
* @param {number} value. The new scroll position
|
|
2296
|
-
*/
|
|
2297
|
-
setHorizontalScrollValue(value) {
|
|
2298
|
-
if (this.nativeElement.isRendered) {
|
|
2299
|
-
this.nativeElement.setHorizontalScrollValue(value);
|
|
2300
|
-
}
|
|
2301
|
-
else {
|
|
2302
|
-
this.nativeElement.whenRendered(() => {
|
|
2303
|
-
this.nativeElement.setHorizontalScrollValue(value);
|
|
2304
|
-
});
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
/** Sets the position of the horizontal scrollbar. You can use this method in combination with the getHorizontalScrollValue and getHorizontalScrollMax.
|
|
2308
|
-
* @param {string | number} rowId. row bound id
|
|
2309
|
-
*/
|
|
2310
|
-
showDetail(rowId) {
|
|
2311
|
-
if (this.nativeElement.isRendered) {
|
|
2312
|
-
this.nativeElement.showDetail(rowId);
|
|
2313
|
-
}
|
|
2314
|
-
else {
|
|
2315
|
-
this.nativeElement.whenRendered(() => {
|
|
2316
|
-
this.nativeElement.showDetail(rowId);
|
|
2317
|
-
});
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
/** Shows the Details of a Row, when row details are enabled.
|
|
2321
|
-
* @param {string | number} rowId. row bound id
|
|
2322
|
-
* @param {any} data. row data matching the data source
|
|
2323
|
-
* @param {{(row: GridRow): void}} callback?. Sets a callback function, which is called after the row is updated. The callback's argument is the updated row.
|
|
2324
|
-
*/
|
|
2325
|
-
updateRow(rowId, data, callback) {
|
|
2326
|
-
if (this.nativeElement.isRendered) {
|
|
2327
|
-
this.nativeElement.updateRow(rowId, data, callback);
|
|
2328
|
-
}
|
|
2329
|
-
else {
|
|
2330
|
-
this.nativeElement.whenRendered(() => {
|
|
2331
|
-
this.nativeElement.updateRow(rowId, data, callback);
|
|
2332
|
-
});
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
/** Updates a row. When batch editing is enabled, the row is not saved until the batch edit is saved.
|
|
2336
|
-
* @param {string | number} rowId. row bound id
|
|
2337
|
-
* @param {string} dataField?. column bound data field. For example, if you have a column with dataField: 'firstName', set 'firstName' here.
|
|
2338
|
-
*/
|
|
2339
|
-
unselect(rowId, dataField) {
|
|
2340
|
-
if (this.nativeElement.isRendered) {
|
|
2341
|
-
this.nativeElement.unselect(rowId, dataField);
|
|
2342
|
-
}
|
|
2343
|
-
else {
|
|
2344
|
-
this.nativeElement.whenRendered(() => {
|
|
2345
|
-
this.nativeElement.unselect(rowId, dataField);
|
|
2346
|
-
});
|
|
2347
|
-
}
|
|
2348
|
-
}
|
|
2349
|
-
/** Unselects a row, cell or column.
|
|
2350
|
-
* @param {string | number} rowId. row bound id
|
|
2351
|
-
*/
|
|
2352
|
-
uncheckRow(rowId) {
|
|
2353
|
-
if (this.nativeElement.isRendered) {
|
|
2354
|
-
this.nativeElement.uncheckRow(rowId);
|
|
2355
|
-
}
|
|
2356
|
-
else {
|
|
2357
|
-
this.nativeElement.whenRendered(() => {
|
|
2358
|
-
this.nativeElement.uncheckRow(rowId);
|
|
2359
|
-
});
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
/** Unchecks a TreeGrid row. Sets its check-box to false.
|
|
2363
|
-
*/
|
|
2364
|
-
uncheckAllRows() {
|
|
2365
|
-
if (this.nativeElement.isRendered) {
|
|
2366
|
-
this.nativeElement.uncheckAllRows();
|
|
2367
|
-
}
|
|
2368
|
-
else {
|
|
2369
|
-
this.nativeElement.whenRendered(() => {
|
|
2370
|
-
this.nativeElement.uncheckAllRows();
|
|
2371
|
-
});
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
/** Unchecks all TreeGrid or Grouping rows. Sets all check-boxes to false.
|
|
2375
|
-
* @param {string | number} rowId. row bound id
|
|
2376
|
-
*/
|
|
2377
|
-
toggleRow(rowId) {
|
|
2378
|
-
if (this.nativeElement.isRendered) {
|
|
2379
|
-
this.nativeElement.toggleRow(rowId);
|
|
2380
|
-
}
|
|
2381
|
-
else {
|
|
2382
|
-
this.nativeElement.whenRendered(() => {
|
|
2383
|
-
this.nativeElement.toggleRow(rowId);
|
|
2384
|
-
});
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
componentDidRender(initialize) {
|
|
2388
|
-
const that = this;
|
|
2389
|
-
const props = {};
|
|
2390
|
-
const events = {};
|
|
2391
|
-
let styles = null;
|
|
2392
|
-
for (let prop in that.props) {
|
|
2393
|
-
if (prop === 'children') {
|
|
2394
|
-
continue;
|
|
2395
|
-
}
|
|
2396
|
-
if (prop === 'style') {
|
|
2397
|
-
styles = that.props[prop];
|
|
2398
|
-
continue;
|
|
2399
|
-
}
|
|
2400
|
-
if (prop.startsWith('on') && that.properties.indexOf(prop) === -1) {
|
|
2401
|
-
events[prop] = that.props[prop];
|
|
2402
|
-
continue;
|
|
2403
|
-
}
|
|
2404
|
-
props[prop] = that.props[prop];
|
|
2405
|
-
}
|
|
2406
|
-
if (initialize) {
|
|
2407
|
-
that.nativeElement = this.componentRef.current;
|
|
2408
|
-
}
|
|
2409
|
-
for (let prop in props) {
|
|
2410
|
-
if (prop === 'class' || prop === 'className') {
|
|
2411
|
-
const classNames = props[prop].trim().split(' ');
|
|
2412
|
-
for (let className in classNames) {
|
|
2413
|
-
if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
|
|
2414
|
-
that.nativeElement.classList.add(classNames[className]);
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
continue;
|
|
2418
|
-
}
|
|
2419
|
-
if (props[prop] !== that.nativeElement[prop]) {
|
|
2420
|
-
const normalizeProp = (str) => {
|
|
2421
|
-
return str.replace(/-([a-z])/g, function (g) {
|
|
2422
|
-
return g[1].toUpperCase();
|
|
2423
|
-
});
|
|
2424
|
-
};
|
|
2425
|
-
if (prop === 'hover' || prop === 'active' || prop === 'focus' || prop === 'selected') {
|
|
2426
|
-
that.nativeElement.setAttribute(prop, '');
|
|
2427
|
-
}
|
|
2428
|
-
const normalizedProp = normalizeProp(prop);
|
|
2429
|
-
that.nativeElement[normalizedProp] = props[prop];
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
for (let eventName in events) {
|
|
2433
|
-
that[eventName] = events[eventName];
|
|
2434
|
-
that.nativeElement[eventName.toLowerCase()] = events[eventName];
|
|
2435
|
-
}
|
|
2436
|
-
if (initialize) {
|
|
2437
|
-
Smart.Render();
|
|
2438
|
-
if (that.onCreate) {
|
|
2439
|
-
that.onCreate();
|
|
2440
|
-
}
|
|
2441
|
-
that.nativeElement.whenRendered(() => {
|
|
2442
|
-
if (that.onReady) {
|
|
2443
|
-
that.onReady();
|
|
2444
|
-
}
|
|
2445
|
-
});
|
|
2446
|
-
}
|
|
2447
|
-
// setup styles.
|
|
2448
|
-
if (styles) {
|
|
2449
|
-
for (let styleName in styles) {
|
|
2450
|
-
that.nativeElement.style[styleName] = styles[styleName];
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
componentDidMount() {
|
|
2455
|
-
this.componentDidRender(true);
|
|
2456
|
-
}
|
|
2457
|
-
componentDidUpdate() {
|
|
2458
|
-
this.componentDidRender(false);
|
|
2459
|
-
}
|
|
2460
|
-
componentWillUnmount() {
|
|
2461
|
-
const that = this;
|
|
2462
|
-
if (!that.nativeElement) {
|
|
2463
|
-
return;
|
|
2464
|
-
}
|
|
2465
|
-
that.nativeElement.whenRenderedCallbacks = [];
|
|
2466
|
-
for (let i = 0; i < that.eventListeners.length; i++) {
|
|
2467
|
-
const eventName = that.eventListeners[i];
|
|
2468
|
-
that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
|
|
2469
|
-
}
|
|
2470
|
-
}
|
|
2471
|
-
render() {
|
|
2472
|
-
return (React.createElement("smart-grid", { ref: this.componentRef }, this.props.children));
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2112
|
+
exports.Smart = Smart;
|
|
2113
|
+
exports.Grid = Grid;
|
|
2114
|
+
exports.default = Grid;
|
|
2475
2115
|
|
|
2476
|
-
|
|
2477
|
-
exports.Grid = Grid;
|
|
2478
|
-
exports.default = Grid;
|
|
2479
|
-
|
|
2480
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2116
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2481
2117
|
|
|
2482
2118
|
})));
|