@syncfusion/ej2-treegrid 20.3.61 → 20.4.40

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.
Files changed (46) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +9 -60
  3. package/README.md +64 -51
  4. package/dist/ej2-treegrid.min.js +2 -2
  5. package/dist/ej2-treegrid.umd.min.js +2 -2
  6. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es2015.js +1198 -910
  8. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  9. package/dist/es6/ej2-treegrid.es5.js +1256 -946
  10. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  11. package/dist/global/ej2-treegrid.min.js +2 -2
  12. package/dist/global/ej2-treegrid.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +17 -11
  15. package/src/treegrid/actions/batch-edit.js +82 -82
  16. package/src/treegrid/actions/clipboard.js +34 -33
  17. package/src/treegrid/actions/context-menu.js +1 -1
  18. package/src/treegrid/actions/crud-actions.js +62 -55
  19. package/src/treegrid/actions/detail-row.js +7 -7
  20. package/src/treegrid/actions/edit.js +61 -60
  21. package/src/treegrid/actions/excel-export.js +2 -2
  22. package/src/treegrid/actions/filter.js +13 -13
  23. package/src/treegrid/actions/freeze-column.js +9 -8
  24. package/src/treegrid/actions/infinite-scroll.js +19 -19
  25. package/src/treegrid/actions/logger.js +10 -10
  26. package/src/treegrid/actions/page.js +8 -8
  27. package/src/treegrid/actions/reorder.js +2 -2
  28. package/src/treegrid/actions/rowdragdrop.js +88 -82
  29. package/src/treegrid/actions/selection.js +34 -32
  30. package/src/treegrid/actions/sort.js +7 -6
  31. package/src/treegrid/actions/summary.js +24 -24
  32. package/src/treegrid/actions/toolbar.js +2 -2
  33. package/src/treegrid/base/data.js +242 -55
  34. package/src/treegrid/base/treegrid-model.d.ts +20 -4
  35. package/src/treegrid/base/treegrid.d.ts +24 -5
  36. package/src/treegrid/base/treegrid.js +232 -192
  37. package/src/treegrid/models/column.js +3 -3
  38. package/src/treegrid/models/index.d.ts +2 -0
  39. package/src/treegrid/models/index.js +1 -0
  40. package/src/treegrid/models/loading-indicator-model.d.ts +19 -0
  41. package/src/treegrid/models/loading-indicator.d.ts +16 -0
  42. package/src/treegrid/models/loading-indicator.js +34 -0
  43. package/src/treegrid/renderer/render.js +20 -19
  44. package/src/treegrid/renderer/virtual-row-model-generator.js +6 -5
  45. package/src/treegrid/renderer/virtual-tree-content-render.js +128 -99
  46. package/src/treegrid/utils.js +12 -11
@@ -22,6 +22,7 @@ import { removeClass, Complex, Collection, getValue } from '@syncfusion/ej2-base
22
22
  import { Event, Property, NotifyPropertyChanges, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';
23
23
  import { Column } from '../models/column';
24
24
  import { RowDropSettings, getUid } from '@syncfusion/ej2-grids';
25
+ import { LoadingIndicator } from '../models/loading-indicator';
25
26
  import { FilterSettings } from '../models/filter-settings';
26
27
  import { TextWrapSettings } from '../models/textwrap-settings';
27
28
  import { Logger as TreeLogger } from '../actions/logger';
@@ -77,9 +78,12 @@ var TreeGrid = /** @class */ (function (_super) {
77
78
  var isEqual = true;
78
79
  var excludeKeys = ['Children', 'childRecords', 'taskData', 'uniqueID', 'parentItem', 'parentUniqueID', 'index'];
79
80
  for (var i = 0; i < keys.length; i++) {
80
- if (old[keys[i]] !== current[keys[i]] && excludeKeys.indexOf(keys[i]) === -1) {
81
- var isDate = old[keys[i]] instanceof Date && current[keys[i]] instanceof Date;
82
- if (!isDate || (old[keys[i]].getTime() !== current[keys[i]].getTime())) {
81
+ if (old[keys[parseInt(i.toString(), 10)]] !== current[keys[parseInt(i.toString(), 10)]] &&
82
+ excludeKeys.indexOf(keys[parseInt(i.toString(), 10)]) === -1) {
83
+ var isDate = old[keys[parseInt(i.toString(), 10)]] instanceof Date &&
84
+ current[keys[parseInt(i.toString(), 10)]] instanceof Date;
85
+ if (!isDate || (old[keys[parseInt(i.toString(), 10)]].getTime() !==
86
+ current[keys[parseInt(i.toString(), 10)]].getTime())) {
83
87
  isEqual = false;
84
88
  break;
85
89
  }
@@ -94,7 +98,7 @@ var TreeGrid = /** @class */ (function (_super) {
94
98
  TreeGrid_1.Inject(TreeGridSelection);
95
99
  setValue('mergePersistData', _this.mergePersistTreeGridData, _this);
96
100
  var logger = 'Logger';
97
- if (!isNullOrUndefined(_this.injectedModules[logger])) {
101
+ if (!isNullOrUndefined(_this.injectedModules["" + logger])) {
98
102
  Grid.Inject(Logger);
99
103
  }
100
104
  _this.grid = new Grid();
@@ -286,17 +290,21 @@ var TreeGrid = /** @class */ (function (_super) {
286
290
  case 'ctrlShiftUpArrow':
287
291
  target = e.target;
288
292
  column = target.closest('.e-rowcell');
289
- row = column.closest('tr');
290
- if (row !== null && row !== undefined) {
291
- this.expandCollapseRequest(row.querySelector('.e-treegridexpand'));
293
+ if (!isNullOrUndefined(column)) {
294
+ row = column.closest('tr');
295
+ if (!isNullOrUndefined(row) && !(isNullOrUndefined(row.getElementsByClassName('e-treegridexpand')[0]))) {
296
+ this.expandCollapseRequest(row.querySelector('.e-treegridexpand'));
297
+ }
292
298
  }
293
299
  break;
294
300
  case 'ctrlShiftDownArrow':
295
301
  target = e.target;
296
302
  column = target.closest('.e-rowcell');
297
- row = column.closest('tr');
298
- if (row !== null && row !== undefined) {
299
- this.expandCollapseRequest(row.querySelector('.e-treegridcollapse'));
303
+ if (!isNullOrUndefined(column)) {
304
+ row = column.closest('tr');
305
+ if (!isNullOrUndefined(row) && !(isNullOrUndefined(row.getElementsByClassName('e-treegridcollapse')[0]))) {
306
+ this.expandCollapseRequest(row.querySelector('.e-treegridcollapse'));
307
+ }
300
308
  }
301
309
  break;
302
310
  case 'downArrow':
@@ -307,7 +315,7 @@ var TreeGrid = /** @class */ (function (_super) {
307
315
  var rowIndex = summaryElement.rowIndex;
308
316
  this.selectRow(rowIndex);
309
317
  var cellIndex = e.target.cellIndex;
310
- var row_1 = summaryElement.children[cellIndex];
318
+ var row_1 = summaryElement.children[parseInt(cellIndex.toString(), 10)];
311
319
  addClass([row_1], 'e-focused');
312
320
  addClass([row_1], 'e-focus');
313
321
  }
@@ -324,7 +332,7 @@ var TreeGrid = /** @class */ (function (_super) {
324
332
  var rIndex = summaryElement.rowIndex;
325
333
  this.selectRow(rIndex);
326
334
  var cIndex = e.target.cellIndex;
327
- var rows = summaryElement.children[cIndex];
335
+ var rows = summaryElement.children[parseInt(cIndex.toString(), 10)];
328
336
  addClass([rows], 'e-focused');
329
337
  addClass([rows], 'e-focus');
330
338
  }
@@ -357,6 +365,8 @@ var TreeGrid = /** @class */ (function (_super) {
357
365
  this.defaultLocale = {};
358
366
  this.flatData = [];
359
367
  this.infiniteScrollData = [];
368
+ this.remoteCollapsedData = [];
369
+ this.remoteExpandedData = [];
360
370
  this.parentData = [];
361
371
  this.columnModel = [];
362
372
  this.isExpandAll = false;
@@ -400,7 +410,7 @@ var TreeGrid = /** @class */ (function (_super) {
400
410
  TreeGrid.prototype.requiredModules = function () {
401
411
  var modules = [];
402
412
  var splitFrozenCount = 'splitFrozenCount';
403
- this.grid[splitFrozenCount](this.getGridColumns(this.columns));
413
+ this.grid["" + splitFrozenCount](this.getGridColumns(this.columns));
404
414
  if (this.isDestroyed) {
405
415
  return modules;
406
416
  }
@@ -610,14 +620,14 @@ var TreeGrid = /** @class */ (function (_super) {
610
620
  var modules = [];
611
621
  modules = gridRequiredModules.apply(this);
612
622
  for (var i = 0; i < modules.length; i++) {
613
- if (modules[i].member === 'virtualscroll') {
614
- modules[i].member = 'treeVirtualScroll';
623
+ if (modules[parseInt(i.toString(), 10)].member === 'virtualscroll') {
624
+ modules[parseInt(i.toString(), 10)].member = 'treeVirtualScroll';
615
625
  }
616
626
  }
617
627
  return modules;
618
628
  };
619
629
  var root = 'root';
620
- this.grid[root] = this[root] ? this[root] : this;
630
+ this.grid["" + root] = this["" + root] ? this["" + root] : this;
621
631
  this.grid.appendTo(gridContainer);
622
632
  if (this.isIndentEnabled) {
623
633
  this.refreshToolbarItems();
@@ -625,12 +635,12 @@ var TreeGrid = /** @class */ (function (_super) {
625
635
  this.wireEvents();
626
636
  this.renderComplete();
627
637
  var destroyTemplate = 'destroyTemplate';
628
- var destroyTemplateFn = this.grid[destroyTemplate];
638
+ var destroyTemplateFn = this.grid["" + destroyTemplate];
629
639
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
630
- this.grid[destroyTemplate] = function (args, index) {
640
+ this.grid["" + destroyTemplate] = function (args, index) {
631
641
  destroyTemplateFn.apply(_this.grid);
632
642
  var portals = 'portals';
633
- if (!(_this.isReact && isNullOrUndefined(_this[portals]))) {
643
+ if (!(_this.isReact && isNullOrUndefined(_this["" + portals]))) {
634
644
  _this.clearTemplate(args, index);
635
645
  }
636
646
  };
@@ -702,6 +712,8 @@ var TreeGrid = /** @class */ (function (_super) {
702
712
  this.grid.enableColumnVirtualization = this.enableColumnVirtualization;
703
713
  this.grid.enableInfiniteScrolling = this.enableInfiniteScrolling;
704
714
  this.grid.infiniteScrollSettings = this.infiniteScrollSettings;
715
+ this.grid.enableVirtualMaskRow = this.enableVirtualMaskRow;
716
+ this.grid.loadingIndicator = this.loadingIndicator;
705
717
  this.grid.width = this.width;
706
718
  this.grid.height = this.height;
707
719
  this.grid.enableAltRow = this.enableAltRow;
@@ -738,10 +750,9 @@ var TreeGrid = /** @class */ (function (_super) {
738
750
  this.grid.frozenColumns = this.frozenColumns;
739
751
  this.grid.clipMode = getActualProperties(this.clipMode);
740
752
  var templateInstance = 'templateDotnetInstance';
741
- this.grid[templateInstance] = this[templateInstance];
753
+ this.grid["" + templateInstance] = this["" + templateInstance];
742
754
  var isJsComponent = 'isJsComponent';
743
- this.grid[isJsComponent] = true;
744
- this.grid.enableVirtualMaskRow = false; // Need to update in virtual mask row feature implementation.
755
+ this.grid["" + isJsComponent] = true;
745
756
  };
746
757
  TreeGrid.prototype.triggerEvents = function (args) {
747
758
  this.trigger(getObject('name', args), args);
@@ -769,8 +780,8 @@ var TreeGrid = /** @class */ (function (_super) {
769
780
  _this.grid.currentViewData.length !== _this.grid.selectionModule.selectedRowIndexes.length) {
770
781
  var updateRowSelection = 'updateRowSelection';
771
782
  for (var i = 0; i < _this.getRows().length; i++) {
772
- if (_this.getRows()[i].getElementsByClassName('e-frame e-icons e-uncheck').length) {
773
- _this.grid.selectionModule[updateRowSelection](_this.getRows()[i], _this.getCurrentViewRecords()[i].index);
783
+ if (_this.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
784
+ _this.grid.selectionModule["" + updateRowSelection](_this.getRows()[parseInt(i.toString(), 10)], _this.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
774
785
  }
775
786
  }
776
787
  }
@@ -822,8 +833,8 @@ var TreeGrid = /** @class */ (function (_super) {
822
833
  this.grid.beforePaste = function (args) {
823
834
  var rows = _this.getRows();
824
835
  var rowIndex = 'rowIndex';
825
- while (rows[args[rowIndex]].classList.contains('e-summaryrow')) {
826
- args[rowIndex]++;
836
+ while (rows[args["" + rowIndex]].classList.contains('e-summaryrow')) {
837
+ args["" + rowIndex]++;
827
838
  }
828
839
  _this.trigger(events.beforePaste, args);
829
840
  };
@@ -831,7 +842,7 @@ var TreeGrid = /** @class */ (function (_super) {
831
842
  _this.grid.on('initial-end', _this.afterGridRender, _this);
832
843
  if (!isNullOrUndefined(_this.loggerModule)) {
833
844
  var loggerModule = 'loggerModule';
834
- _this.loggerModule = _this.grid[loggerModule] = new TreeLogger(_this.grid);
845
+ _this.loggerModule = _this.grid["" + loggerModule] = new TreeLogger(_this.grid);
835
846
  }
836
847
  };
837
848
  this.grid.printComplete = this.triggerEvents.bind(this);
@@ -846,10 +857,10 @@ var TreeGrid = /** @class */ (function (_super) {
846
857
  TreeGrid.prototype.lastRowBorder = function (visiblerow, isAddBorder) {
847
858
  for (var j = 0; j < visiblerow.cells.length; j++) {
848
859
  if (isAddBorder) {
849
- addClass([visiblerow.cells[j]], 'e-lastrowcell');
860
+ addClass([visiblerow.cells[parseInt(j.toString(), 10)]], 'e-lastrowcell');
850
861
  }
851
862
  else {
852
- removeClass([visiblerow.cells[j]], 'e-lastrowcell');
863
+ removeClass([visiblerow.cells[parseInt(j.toString(), 10)]], 'e-lastrowcell');
853
864
  }
854
865
  }
855
866
  };
@@ -878,22 +889,22 @@ var TreeGrid = /** @class */ (function (_super) {
878
889
  var rows = _this.getContentTable().rows;
879
890
  var totalRows = [].slice.call(rows);
880
891
  for (var i = totalRows.length - 1; i > 0; i--) {
881
- if (!isHidden(totalRows[i])) {
882
- if (totalRows[i].nextElementSibling) {
883
- _this.lastRowBorder(totalRows[i], true);
892
+ if (!isHidden(totalRows[parseInt(i.toString(), 10)])) {
893
+ if (totalRows[parseInt(i.toString(), 10)].nextElementSibling) {
894
+ _this.lastRowBorder(totalRows[parseInt(i.toString(), 10)], true);
884
895
  }
885
896
  break;
886
897
  }
887
898
  }
888
899
  }
889
900
  var action = 'action';
890
- if (_this.enableVirtualization && _this.selectionSettings.persistSelection && (_this.dataResults[action] === 'expand' || _this.dataResults[action] === 'collapse')) {
901
+ if (_this.enableVirtualization && _this.selectionSettings.persistSelection && (_this.dataResults["" + action] === 'expand' || _this.dataResults["" + action] === 'collapse')) {
891
902
  var refreshPersistSelection = 'refreshPersistSelection';
892
- _this.grid.selectionModule[refreshPersistSelection]();
903
+ _this.grid.selectionModule["" + refreshPersistSelection]();
893
904
  if (_this.grid.selectionSettings.type === 'Single') {
894
905
  var updateRowSelection = 'updateRowSelection';
895
906
  var index = _this.getCurrentViewRecords().indexOf(_this.grid.selectionModule['data']);
896
- _this.grid.selectionModule[updateRowSelection](_this.getRows()[index], index);
907
+ _this.grid.selectionModule["" + updateRowSelection](_this.getRows()[parseInt(index.toString(), 10)], index);
897
908
  }
898
909
  }
899
910
  _this.trigger(events.dataBound, args);
@@ -911,7 +922,7 @@ var TreeGrid = /** @class */ (function (_super) {
911
922
  else if (treeGrid.flatData.length === 0 && isOffline(treeGrid) && treeGrid.dataSource instanceof DataManager) {
912
923
  var dm = treeGrid.dataSource;
913
924
  treeGrid.dataModule.convertToFlatData(dm.dataSource.json);
914
- args.result = treeGrid.grid.dataSource[dataSource].json = treeGrid.flatData;
925
+ args.result = treeGrid.grid.dataSource["" + dataSource].json = treeGrid.flatData;
915
926
  }
916
927
  if (!isRemoteData(treeGrid) && !isCountRequired(this) && !isNullOrUndefined(treeGrid.dataSource)) {
917
928
  if (this.isPrinting) {
@@ -1015,7 +1026,7 @@ var TreeGrid = /** @class */ (function (_super) {
1015
1026
  this.grid.cellEdit = function (args) {
1016
1027
  var prom = 'promise';
1017
1028
  var promise = new Deferred();
1018
- args[prom] = promise;
1029
+ args["" + prom] = promise;
1019
1030
  _this.notify(events.cellEdit, args);
1020
1031
  return promise;
1021
1032
  };
@@ -1064,17 +1075,17 @@ var TreeGrid = /** @class */ (function (_super) {
1064
1075
  this.flatData : new DataManager(this.dataSource.dataSource, this.dataSource.defaultQuery, this.dataSource.adaptor);
1065
1076
  }
1066
1077
  if (this.dataSource instanceof DataManager && (this.dataSource.dataSource.offline || this.dataSource.ready)) {
1067
- this.grid.dataSource[dataSource].json = extendArray(this.dataSource[dataSource].json);
1068
- this.grid.dataSource[ready] = this.dataSource.ready;
1078
+ this.grid.dataSource["" + dataSource].json = extendArray(this.dataSource["" + dataSource].json);
1079
+ this.grid.dataSource["" + ready] = this.dataSource.ready;
1069
1080
  // eslint-disable-next-line @typescript-eslint/no-this-alias
1070
1081
  var proxy_1 = this;
1071
- if (!isNullOrUndefined(this.grid.dataSource[ready])) {
1072
- this.grid.dataSource[ready].then(function (e) {
1082
+ if (!isNullOrUndefined(this.grid.dataSource["" + ready])) {
1083
+ this.grid.dataSource["" + ready].then(function (e) {
1073
1084
  var dm = proxy_1.grid.dataSource;
1074
- dm[dataSource].offline = true;
1075
- dm[isDataAvailable] = true;
1076
- dm[dataSource].json = e.result;
1077
- dm[adaptor] = new JsonAdaptor();
1085
+ dm["" + dataSource].offline = true;
1086
+ dm["" + isDataAvailable] = true;
1087
+ dm["" + dataSource].json = e.result;
1088
+ dm["" + adaptor] = new JsonAdaptor();
1078
1089
  });
1079
1090
  }
1080
1091
  }
@@ -1090,6 +1101,18 @@ var TreeGrid = /** @class */ (function (_super) {
1090
1101
  if (requestType === 'reorder') {
1091
1102
  _this.notify('getColumnIndex', {});
1092
1103
  }
1104
+ if (isRemoteData(_this) && _this.enableVirtualization) {
1105
+ if (args.requestType === 'virtualscroll') {
1106
+ _this.query.expand('VirtualScrollingAction');
1107
+ _this.showSpinner();
1108
+ }
1109
+ else if (args.requestType === 'searching' && args.searchString === '') {
1110
+ _this.query.expand('ClearSearchingAction');
1111
+ }
1112
+ else if (args.action === 'clearFilter') {
1113
+ _this.query.expand('ClearFilteringAction');
1114
+ }
1115
+ }
1093
1116
  _this.notify('actionBegin', { editAction: args });
1094
1117
  if (!isRemoteData(_this) && !isNullOrUndefined(_this.filterModule) && !isCountRequired(_this)
1095
1118
  && (_this.grid.filterSettings.columns.length === 0 && _this.grid.searchSettings.key.length === 0)) {
@@ -1133,12 +1156,12 @@ var TreeGrid = /** @class */ (function (_super) {
1133
1156
  _this.grid.refresh();
1134
1157
  }
1135
1158
  if (args.action === 'filter') {
1136
- if (_this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender) {
1159
+ if (_this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender && !(isRemoteData(_this) && _this.enableVirtualization)) {
1137
1160
  _this.expandAll();
1138
1161
  }
1139
1162
  }
1140
1163
  if (args.requestType === 'searching') {
1141
- if (_this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender) {
1164
+ if (_this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender && !(isRemoteData(_this) && _this.enableVirtualization)) {
1142
1165
  _this.expandAll();
1143
1166
  }
1144
1167
  }
@@ -1254,7 +1277,7 @@ var TreeGrid = /** @class */ (function (_super) {
1254
1277
  this.bindGridEvents();
1255
1278
  setValue('registeredTemplate', this.registeredTemplate, this.grid);
1256
1279
  var ref = 'viewContainerRef';
1257
- setValue('viewContainerRef', this[ref], this.grid);
1280
+ setValue('viewContainerRef', this["" + ref], this.grid);
1258
1281
  };
1259
1282
  /**
1260
1283
  * AutoGenerate TreeGrid columns from first record
@@ -1272,8 +1295,8 @@ var TreeGrid = /** @class */ (function (_super) {
1272
1295
  // }
1273
1296
  var keys = Object.keys(record);
1274
1297
  for (var i = 0; i < keys.length; i++) {
1275
- if ([this.childMapping, this.parentIdMapping].indexOf(keys[i]) === -1) {
1276
- this.columns.push(keys[i]);
1298
+ if ([this.childMapping, this.parentIdMapping].indexOf(keys[parseInt(i.toString(), 10)]) === -1) {
1299
+ this.columns.push(keys[parseInt(i.toString(), 10)]);
1277
1300
  }
1278
1301
  }
1279
1302
  }
@@ -1290,7 +1313,7 @@ var TreeGrid = /** @class */ (function (_super) {
1290
1313
  edit.template = this.editSettings.template;
1291
1314
  edit.showDeleteConfirmDialog = this.editSettings.showDeleteConfirmDialog;
1292
1315
  edit.allowNextRowEdit = this.editSettings.allowNextRowEdit;
1293
- edit[guid] = this.editSettings[guid];
1316
+ edit["" + guid] = this.editSettings["" + guid];
1294
1317
  edit.dialog = this.editSettings.dialog;
1295
1318
  switch (this.editSettings.mode) {
1296
1319
  case 'Dialog':
@@ -1319,7 +1342,7 @@ var TreeGrid = /** @class */ (function (_super) {
1319
1342
  if (this.contextMenuItems) {
1320
1343
  var items = [];
1321
1344
  for (var i = 0; i < this.contextMenuItems.length; i++) {
1322
- switch (this.contextMenuItems[i]) {
1345
+ switch (this.contextMenuItems[parseInt(i.toString(), 10)]) {
1323
1346
  case 'AddRow':
1324
1347
  case ContextMenuItems.AddRow:
1325
1348
  items.push({ text: this.l10n.getConstant('AddRow'),
@@ -1337,7 +1360,7 @@ var TreeGrid = /** @class */ (function (_super) {
1337
1360
  target: '.e-content', iconCss: 'e-outdent e-icons', id: this.element.id + '_gridcontrol_cmenu_Outdent' });
1338
1361
  break;
1339
1362
  default:
1340
- items.push(this.contextMenuItems[i]);
1363
+ items.push(this.contextMenuItems[parseInt(i.toString(), 10)]);
1341
1364
  }
1342
1365
  }
1343
1366
  return items;
@@ -1358,7 +1381,7 @@ var TreeGrid = /** @class */ (function (_super) {
1358
1381
  var items = [];
1359
1382
  var tooltipText = void 0;
1360
1383
  for (var i = 0; i < this.toolbar.length; i++) {
1361
- switch (this.toolbar[i]) {
1384
+ switch (this.toolbar[parseInt(i.toString(), 10)]) {
1362
1385
  case 'Search':
1363
1386
  case ToolbarItem.Search:
1364
1387
  items.push('Search');
@@ -1397,7 +1420,7 @@ var TreeGrid = /** @class */ (function (_super) {
1397
1420
  });
1398
1421
  break;
1399
1422
  default:
1400
- items.push(this.toolbar[i]);
1423
+ items.push(this.toolbar[parseInt(i.toString(), 10)]);
1401
1424
  }
1402
1425
  }
1403
1426
  return items;
@@ -1422,31 +1445,31 @@ var TreeGrid = /** @class */ (function (_super) {
1422
1445
  var gridColumnCollection = [];
1423
1446
  for (var i = 0; i < column.length; i++) {
1424
1447
  index = index + 1;
1425
- var treeColumn = this.grid.getColumnByUid(column[i].uid);
1448
+ var treeColumn = this.grid.getColumnByUid(column[parseInt(i.toString(), 10)].uid);
1426
1449
  gridColumn = treeColumn ? treeColumn : {};
1427
1450
  treeGridColumn = {};
1428
- if (typeof this.columns[i] === 'string') {
1429
- gridColumn.field = treeGridColumn.field = this.columns[i];
1451
+ if (typeof this.columns[parseInt(i.toString(), 10)] === 'string') {
1452
+ gridColumn.field = treeGridColumn.field = this.columns[parseInt(i.toString(), 10)];
1430
1453
  }
1431
1454
  else {
1432
- for (var _i = 0, _a = Object.keys(column[i]); _i < _a.length; _i++) {
1455
+ for (var _i = 0, _a = Object.keys(column[parseInt(i.toString(), 10)]); _i < _a.length; _i++) {
1433
1456
  var prop = _a[_i];
1434
1457
  if (index === this.treeColumnIndex && prop === 'template') {
1435
- treeGridColumn[prop] = column[i][prop];
1458
+ treeGridColumn["" + prop] = column[parseInt(i.toString(), 10)]["" + prop];
1436
1459
  }
1437
- else if (prop === 'columns' && !isNullOrUndefined(column[i][prop])) {
1438
- gridColumn[prop] = this.getGridColumns(column[i][prop], false, this.columnModel.length - 1);
1439
- treeGridColumn[prop] = column[i][prop];
1460
+ else if (prop === 'columns' && !isNullOrUndefined(column[parseInt(i.toString(), 10)]["" + prop])) {
1461
+ gridColumn["" + prop] = this.getGridColumns(column[parseInt(i.toString(), 10)]["" + prop], false, this.columnModel.length - 1);
1462
+ treeGridColumn["" + prop] = column[parseInt(i.toString(), 10)]["" + prop];
1440
1463
  }
1441
1464
  else if (this.initialRender && !isNullOrUndefined(treeColumn) && this.enablePersistence && prop === 'edit') {
1442
- gridColumn[prop] = treeGridColumn[prop] = treeColumn[prop];
1465
+ gridColumn["" + prop] = treeGridColumn["" + prop] = treeColumn["" + prop];
1443
1466
  }
1444
1467
  else if (!(treeColumn) || prop !== 'sortComparer') {
1445
- gridColumn[prop] = treeGridColumn[prop] = column[i][prop];
1468
+ gridColumn["" + prop] = treeGridColumn["" + prop] = column[parseInt(i.toString(), 10)]["" + prop];
1446
1469
  }
1447
1470
  }
1448
1471
  }
1449
- if (!treeGridColumn[stackedColumn]) {
1472
+ if (!treeGridColumn["" + stackedColumn]) {
1450
1473
  this.columnModel.push(new Column(treeGridColumn));
1451
1474
  }
1452
1475
  gridColumnCollection.push(gridColumn);
@@ -1566,7 +1589,7 @@ var TreeGrid = /** @class */ (function (_super) {
1566
1589
  this.grid.query = this.query;
1567
1590
  break;
1568
1591
  case 'enableCollapseAll':
1569
- if (newProp[prop]) {
1592
+ if (newProp["" + prop]) {
1570
1593
  this.collapseAll();
1571
1594
  }
1572
1595
  else {
@@ -1665,8 +1688,8 @@ var TreeGrid = /** @class */ (function (_super) {
1665
1688
  this.grid.columnMenuItems = getActualProperties(this.columnMenuItems);
1666
1689
  break;
1667
1690
  case 'editSettings':
1668
- if (this.grid.isEdit && this.grid.editSettings.mode === 'Normal' && newProp[prop].mode &&
1669
- (newProp[prop].mode === 'Cell' || newProp[prop].mode === 'Row')) {
1691
+ if (this.grid.isEdit && this.grid.editSettings.mode === 'Normal' && newProp["" + prop].mode &&
1692
+ (newProp["" + prop].mode === 'Cell' || newProp["" + prop].mode === 'Row')) {
1670
1693
  this.grid.closeEdit();
1671
1694
  }
1672
1695
  this.grid.editSettings = this.getGridEditSettings();
@@ -1713,8 +1736,8 @@ var TreeGrid = /** @class */ (function (_super) {
1713
1736
  'pagerModule', 'keyboardModule', 'columnMenuModule', 'contextMenuModule', 'editModule', 'virtualScrollModule',
1714
1737
  'selectionModule', 'detailRow', 'rowDragAndDropModule', 'freezeModule'];
1715
1738
  for (var i = 0; i < modules.length; i++) {
1716
- if (this[modules[i]]) {
1717
- this[modules[i]] = null;
1739
+ if (this[modules[parseInt(i.toString(), 10)]]) {
1740
+ this[modules[parseInt(i.toString(), 10)]] = null;
1718
1741
  }
1719
1742
  }
1720
1743
  this.element.innerHTML = '';
@@ -1757,10 +1780,10 @@ var TreeGrid = /** @class */ (function (_super) {
1757
1780
  var ignoreOnColumn = ['filter', 'edit', 'filterBarTemplate', 'headerTemplate', 'template',
1758
1781
  'commandTemplate', 'commands', 'dataSource'];
1759
1782
  for (var i = 0; i < keyEntity.length; i++) {
1760
- var currentObject = this[keyEntity[i]];
1761
- for (var k = 0, val = ignoreOnPersist[keyEntity[i]]; (!isNullOrUndefined(val) && k < val.length); k++) {
1762
- var objVal = val[k];
1763
- delete currentObject[objVal];
1783
+ var currentObject = this[keyEntity[parseInt(i.toString(), 10)]];
1784
+ for (var k = 0, val = ignoreOnPersist[keyEntity[parseInt(i.toString(), 10)]]; (!isNullOrUndefined(val) && k < val.length); k++) {
1785
+ var objVal = val[parseInt(k.toString(), 10)];
1786
+ delete currentObject["" + objVal];
1764
1787
  }
1765
1788
  }
1766
1789
  this.ignoreInArrays(ignoreOnColumn, this.columns);
@@ -1768,18 +1791,18 @@ var TreeGrid = /** @class */ (function (_super) {
1768
1791
  };
1769
1792
  TreeGrid.prototype.ignoreInArrays = function (ignoreOnColumn, columns) {
1770
1793
  for (var i = 0; i < columns.length; i++) {
1771
- if (columns[i].columns) {
1772
- this.ignoreInColumn(ignoreOnColumn, columns[i]);
1773
- this.ignoreInArrays(ignoreOnColumn, columns[i].columns);
1794
+ if (columns[parseInt(i.toString(), 10)].columns) {
1795
+ this.ignoreInColumn(ignoreOnColumn, columns[parseInt(i.toString(), 10)]);
1796
+ this.ignoreInArrays(ignoreOnColumn, columns[parseInt(i.toString(), 10)].columns);
1774
1797
  }
1775
1798
  else {
1776
- this.ignoreInColumn(ignoreOnColumn, columns[i]);
1799
+ this.ignoreInColumn(ignoreOnColumn, columns[parseInt(i.toString(), 10)]);
1777
1800
  }
1778
1801
  }
1779
1802
  };
1780
1803
  TreeGrid.prototype.ignoreInColumn = function (ignoreOnColumn, column) {
1781
1804
  for (var i = 0; i < ignoreOnColumn.length; i++) {
1782
- delete column[ignoreOnColumn[i]];
1805
+ delete column[ignoreOnColumn[parseInt(i.toString(), 10)]];
1783
1806
  column.filter = {};
1784
1807
  }
1785
1808
  };
@@ -1823,7 +1846,7 @@ var TreeGrid = /** @class */ (function (_super) {
1823
1846
  TreeGrid.prototype.addRecord = function (data, index, position) {
1824
1847
  if (this.editModule) {
1825
1848
  var isAddedRowByMethod = 'isAddedRowByMethod';
1826
- this.editModule[isAddedRowByMethod] = true;
1849
+ this.editModule["" + isAddedRowByMethod] = true;
1827
1850
  this.editModule.addRecord(data, index, position);
1828
1851
  }
1829
1852
  };
@@ -1870,7 +1893,7 @@ var TreeGrid = /** @class */ (function (_super) {
1870
1893
  TreeGrid.prototype.updateRow = function (index, data) {
1871
1894
  if (this.grid.editModule) {
1872
1895
  if (!isNullOrUndefined(index)) {
1873
- var griddata = this.grid.getCurrentViewRecords()[index];
1896
+ var griddata = this.grid.getCurrentViewRecords()[parseInt(index.toString(), 10)];
1874
1897
  extend(griddata, data);
1875
1898
  this.grid.editModule.updateRow(index, griddata);
1876
1899
  }
@@ -1980,7 +2003,7 @@ var TreeGrid = /** @class */ (function (_super) {
1980
2003
  TreeGrid.prototype.setCellValue = function (key, field, value) {
1981
2004
  this.grid.setCellValue(key, field, value);
1982
2005
  var rowIndex = this.grid.getRowIndexByPrimaryKey(key);
1983
- var record = this.getCurrentViewRecords()[rowIndex];
2006
+ var record = this.getCurrentViewRecords()[parseInt(rowIndex.toString(), 10)];
1984
2007
  if (!isNullOrUndefined(record)) {
1985
2008
  editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
1986
2009
  }
@@ -1999,7 +2022,7 @@ var TreeGrid = /** @class */ (function (_super) {
1999
2022
  var level = 0;
2000
2023
  var record = {};
2001
2024
  currentRecords.some(function (value) {
2002
- if (value[primaryKey] === key) {
2025
+ if (value["" + primaryKey] === key) {
2003
2026
  record = value;
2004
2027
  return true;
2005
2028
  }
@@ -2020,7 +2043,7 @@ var TreeGrid = /** @class */ (function (_super) {
2020
2043
  rowData.expanded = record.expanded;
2021
2044
  this.grid.setRowData(key, rowData);
2022
2045
  var visibleRecords = this.getVisibleRecords();
2023
- if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])[primaryKey]) {
2046
+ if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])["" + primaryKey]) {
2024
2047
  var table = this.getContentTable();
2025
2048
  var sHeight = table.scrollHeight;
2026
2049
  var clientHeight = this.getContent().clientHeight;
@@ -2083,7 +2106,7 @@ var TreeGrid = /** @class */ (function (_super) {
2083
2106
  var Columns = this.initialRender ? this.grid.columns : this.columns;
2084
2107
  var columnModel = 'columnModel';
2085
2108
  if (this.grid.columns.length !== this.columnModel.length) {
2086
- Columns = this.grid[columnModel];
2109
+ Columns = this.grid["" + columnModel];
2087
2110
  }
2088
2111
  return iterateArrayOrObject(Columns, function (item) {
2089
2112
  if (item.uid === uid) {
@@ -2176,7 +2199,7 @@ var TreeGrid = /** @class */ (function (_super) {
2176
2199
  };
2177
2200
  TreeGrid.prototype.getVirtualColIndexByUid = function (uid) {
2178
2201
  var columnModel = 'columnModel';
2179
- var index = iterateArrayOrObject(this.grid[columnModel], function (item, index) {
2202
+ var index = iterateArrayOrObject(this.grid["" + columnModel], function (item, index) {
2180
2203
  if (item.uid === uid) {
2181
2204
  return index;
2182
2205
  }
@@ -2217,25 +2240,25 @@ var TreeGrid = /** @class */ (function (_super) {
2217
2240
  this.columnModel = [];
2218
2241
  for (var i = 0; i < gridColumns.length; i++) {
2219
2242
  gridColumn = {};
2220
- for (var _i = 0, _a = Object.keys(gridColumns[i]); _i < _a.length; _i++) {
2243
+ for (var _i = 0, _a = Object.keys(gridColumns[parseInt(i.toString(), 10)]); _i < _a.length; _i++) {
2221
2244
  var prop = _a[_i];
2222
- gridColumn[prop] = gridColumns[i][prop];
2245
+ gridColumn["" + prop] = gridColumns[parseInt(i.toString(), 10)]["" + prop];
2223
2246
  }
2224
2247
  this.columnModel.push(new Column(gridColumn));
2225
- if (field === this.columnModel[i].field && this.columnModel[i].type !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
2226
- this.columnModel[i].template = temp;
2248
+ if (field === this.columnModel[parseInt(i.toString(), 10)].field && this.columnModel[parseInt(i.toString(), 10)].type !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
2249
+ this.columnModel[parseInt(i.toString(), 10)].template = temp;
2227
2250
  }
2228
2251
  }
2229
2252
  }
2230
2253
  var deepMerge = 'deepMerge';
2231
- this[deepMerge] = ['columns']; // Workaround for blazor updateModel
2254
+ this["" + deepMerge] = ['columns']; // Workaround for blazor updateModel
2232
2255
  if (this.grid.columns.length !== this.columnModel.length) {
2233
2256
  this.stackedHeader = true;
2234
2257
  }
2235
2258
  if (!this.stackedHeader) {
2236
2259
  merge(this.columns, this.columnModel);
2237
2260
  }
2238
- this[deepMerge] = undefined; // Workaround for blazor updateModel
2261
+ this["" + deepMerge] = undefined; // Workaround for blazor updateModel
2239
2262
  return this.columnModel;
2240
2263
  };
2241
2264
  /**
@@ -2248,11 +2271,11 @@ var TreeGrid = /** @class */ (function (_super) {
2248
2271
  };
2249
2272
  TreeGrid.prototype.mergePersistTreeGridData = function () {
2250
2273
  var persist1 = 'mergePersistGridData';
2251
- this.grid[persist1].apply(this);
2274
+ this.grid["" + persist1].apply(this);
2252
2275
  };
2253
2276
  TreeGrid.prototype.mergeColumns = function (storedColumn, columns) {
2254
2277
  var persist2 = 'mergeColumns';
2255
- this.grid[persist2].apply(this, [storedColumn, columns]);
2278
+ this.grid["" + persist2].apply(this, [storedColumn, columns]);
2256
2279
  };
2257
2280
  TreeGrid.prototype.updateTreeGridModel = function () {
2258
2281
  this.setProperties({ filterSettings: getObject('properties', this.grid.filterSettings) }, true);
@@ -2277,8 +2300,8 @@ var TreeGrid = /** @class */ (function (_super) {
2277
2300
  var dRows = [];
2278
2301
  var rows = this.grid.getDataRows();
2279
2302
  for (var i = 0, len = rows.length; i < len; i++) {
2280
- if (!rows[i].classList.contains('e-summaryrow')) {
2281
- dRows.push(rows[i]);
2303
+ if (!rows[parseInt(i.toString(), 10)].classList.contains('e-summaryrow')) {
2304
+ dRows.push(rows[parseInt(i.toString(), 10)]);
2282
2305
  }
2283
2306
  }
2284
2307
  return dRows;
@@ -2414,9 +2437,9 @@ var TreeGrid = /** @class */ (function (_super) {
2414
2437
  var currentViewRecords = this.getCurrentViewRecords();
2415
2438
  if (!this.allowPaging) {
2416
2439
  for (var i = 0; i < currentViewRecords.length; i++) {
2417
- visibleRecords.push(currentViewRecords[i]);
2418
- if (!currentViewRecords[i].expanded) {
2419
- i += findChildrenRecords(currentViewRecords[i]).length;
2440
+ visibleRecords.push(currentViewRecords[parseInt(i.toString(), 10)]);
2441
+ if (!currentViewRecords[parseInt(i.toString(), 10)].expanded) {
2442
+ i += findChildrenRecords(currentViewRecords[parseInt(i.toString(), 10)]).length;
2420
2443
  }
2421
2444
  }
2422
2445
  }
@@ -2476,11 +2499,10 @@ var TreeGrid = /** @class */ (function (_super) {
2476
2499
  if (this.editSettings.mode === 'Batch') {
2477
2500
  var obj = 'dialogObj';
2478
2501
  var showDialog = 'showDialog';
2479
- if ((this.getBatchChanges()[this.changedRecords].length ||
2480
- this.getBatchChanges()[this.deletedRecords].length || this.getBatchChanges()[this.addedRecords].length)
2481
- && this.editSettings.showConfirmDialog) {
2482
- var dialogObj = this.grid.editModule[obj];
2483
- this.grid.editModule[showDialog]('CancelEdit', dialogObj);
2502
+ if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
2503
+ this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
2504
+ var dialogObj = this.grid.editModule["" + obj];
2505
+ this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
2484
2506
  this.targetElement = target;
2485
2507
  return;
2486
2508
  }
@@ -2500,7 +2522,7 @@ var TreeGrid = /** @class */ (function (_super) {
2500
2522
  var record = rowInfo_1.rowData;
2501
2523
  if (this.grid.isFrozenGrid() && this.enableVirtualization && !Object.keys(record).length) {
2502
2524
  var freezeRows = 'freezeRows';
2503
- record = this.grid.contentModule[freezeRows].filter(function (e) { return e.uid === rowInfo_1.row.getAttribute('data-uid'); })[0].data;
2525
+ record = this.grid.contentModule["" + freezeRows].filter(function (e) { return e.uid === rowInfo_1.row.getAttribute('data-uid'); })[0].data;
2504
2526
  }
2505
2527
  if (this.enableImmutableMode) {
2506
2528
  record = this.getCurrentViewRecords()[rowInfo_1.rowIndex];
@@ -2536,7 +2558,7 @@ var TreeGrid = /** @class */ (function (_super) {
2536
2558
  _this.expandCollapseAllChildren(record, 'expand', key, level);
2537
2559
  }
2538
2560
  var children = 'Children';
2539
- if (!(isRemoteData(_this) && !isOffline(_this)) && (!isCountRequired(_this) || !isNullOrUndefined(record[children]))) {
2561
+ if (!(isRemoteData(_this) && !isOffline(_this)) && (!isCountRequired(_this) || !isNullOrUndefined(record["" + children]))) {
2540
2562
  var collapseArgs = { data: record, row: row };
2541
2563
  _this.setHeightForFrozenContent();
2542
2564
  if (!isNullOrUndefined(_this.expandStateMapping)) {
@@ -2557,7 +2579,7 @@ var TreeGrid = /** @class */ (function (_super) {
2557
2579
  });
2558
2580
  records.unshift(record);
2559
2581
  for (var i = 0; i < records.length; i++) {
2560
- this.expandCollapse(action, null, records[i]);
2582
+ this.expandCollapse(action, null, records[parseInt(i.toString(), 10)]);
2561
2583
  }
2562
2584
  };
2563
2585
  TreeGrid.prototype.setHeightForFrozenContent = function () {
@@ -2623,12 +2645,12 @@ var TreeGrid = /** @class */ (function (_super) {
2623
2645
  var totalRecords = record;
2624
2646
  if (totalRecords.length) {
2625
2647
  for (var i = 0; i < totalRecords.length; i++) {
2626
- totalRecords[i][this.expandStateMapping] = state;
2627
- editAction({ value: totalRecords[i], action: 'edit' }, this, this.isSelfReference, totalRecords[i].index, this.grid.selectedRowIndex, this.expandStateMapping);
2648
+ totalRecords[parseInt(i.toString(), 10)][this.expandStateMapping] = state;
2649
+ editAction({ value: totalRecords[parseInt(i.toString(), 10)], action: 'edit' }, this, this.isSelfReference, totalRecords[parseInt(i.toString(), 10)].index, this.grid.selectedRowIndex, this.expandStateMapping);
2628
2650
  }
2629
2651
  }
2630
2652
  else {
2631
- record[this.expandStateMapping] = state;
2653
+ record["" + this.expandStateMapping] = state;
2632
2654
  editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, this.expandStateMapping);
2633
2655
  }
2634
2656
  };
@@ -2666,8 +2688,8 @@ var TreeGrid = /** @class */ (function (_super) {
2666
2688
  TreeGrid.prototype.expandAction = function (record, key, level, isPaging) {
2667
2689
  if (isPaging === void 0) { isPaging = false; }
2668
2690
  var _loop_1 = function (i) {
2669
- if (!isNullOrUndefined(record[i].parentItem)) {
2670
- var puniqueID_1 = record[i].parentItem.uniqueID;
2691
+ if (!isNullOrUndefined(record[parseInt(i.toString(), 10)].parentItem)) {
2692
+ var puniqueID_1 = record[parseInt(i.toString(), 10)].parentItem.uniqueID;
2671
2693
  var parentItem = this_1.flatData.filter(function (e) {
2672
2694
  return e.uniqueID === puniqueID_1;
2673
2695
  });
@@ -2689,7 +2711,7 @@ var TreeGrid = /** @class */ (function (_super) {
2689
2711
  }
2690
2712
  }
2691
2713
  if (!isPaging) {
2692
- this_1.expandRow(null, record[i], key, level);
2714
+ this_1.expandRow(null, record[parseInt(i.toString(), 10)], key, level);
2693
2715
  }
2694
2716
  };
2695
2717
  var this_1 = this;
@@ -2747,7 +2769,7 @@ var TreeGrid = /** @class */ (function (_super) {
2747
2769
  var dataSource = isRemoteData(this) ? this.getCurrentViewRecords() : this.grid.dataSource;
2748
2770
  if (!isNullOrUndefined(primaryKeyField)) {
2749
2771
  var rec = dataSource.filter(function (e) {
2750
- return e[primaryKeyField].toString() === key.toString();
2772
+ return e["" + primaryKeyField].toString() === key.toString();
2751
2773
  });
2752
2774
  if (action === 'Expand') {
2753
2775
  this.expandAction(rec, key, null);
@@ -2764,14 +2786,14 @@ var TreeGrid = /** @class */ (function (_super) {
2764
2786
  }
2765
2787
  else {
2766
2788
  for (var i = 0; i < record.length; i++) {
2767
- this.collapseRow(null, record[i], key);
2789
+ this.collapseRow(null, record[parseInt(i.toString(), 10)], key);
2768
2790
  }
2769
2791
  }
2770
2792
  if (!this.grid.contentModule.isDataSourceChanged && this.enableVirtualization && this.getRows()
2771
2793
  && this.parentData.length === this.getRows().length) {
2772
2794
  var endIndex = 'endIndex';
2773
2795
  this.grid.contentModule.startIndex = -1;
2774
- this.grid.contentModule[endIndex] = -1;
2796
+ this.grid.contentModule["" + endIndex] = -1;
2775
2797
  }
2776
2798
  };
2777
2799
  /**
@@ -2808,10 +2830,10 @@ var TreeGrid = /** @class */ (function (_super) {
2808
2830
  if (rows.length) {
2809
2831
  for (var i = 0; i < rows.length; i++) {
2810
2832
  if (action === 'collapse') {
2811
- this.collapseRow(rows[i]);
2833
+ this.collapseRow(rows[parseInt(i.toString(), 10)]);
2812
2834
  }
2813
2835
  else {
2814
- this.expandRow(rows[i]);
2836
+ this.expandRow(rows[parseInt(i.toString(), 10)]);
2815
2837
  }
2816
2838
  }
2817
2839
  }
@@ -2825,10 +2847,10 @@ var TreeGrid = /** @class */ (function (_super) {
2825
2847
  else {
2826
2848
  for (var i = 0; i < rows.length; i++) {
2827
2849
  if (action === 'collapse') {
2828
- this.collapseRow(rows[i]);
2850
+ this.collapseRow(rows[parseInt(i.toString(), 10)]);
2829
2851
  }
2830
2852
  else {
2831
- this.expandRow(rows[i]);
2853
+ this.expandRow(rows[parseInt(i.toString(), 10)]);
2832
2854
  }
2833
2855
  }
2834
2856
  }
@@ -2852,7 +2874,7 @@ var TreeGrid = /** @class */ (function (_super) {
2852
2874
  var rowIndex;
2853
2875
  if (isNullOrUndefined(row)) {
2854
2876
  rowIndex = this.getCurrentViewRecords().indexOf(record);
2855
- row = gridRows[rowIndex];
2877
+ row = gridRows[parseInt(rowIndex.toString(), 10)];
2856
2878
  }
2857
2879
  else {
2858
2880
  rowIndex = +row.getAttribute('data-rowindex');
@@ -2929,11 +2951,11 @@ var TreeGrid = /** @class */ (function (_super) {
2929
2951
  var rows = this.getContentTable().rows;
2930
2952
  totalRows = [].slice.call(rows);
2931
2953
  for (var i = totalRows.length - 1; i >= 0; i--) {
2932
- if (!isHidden(totalRows[i])) {
2954
+ if (!isHidden(totalRows[parseInt(i.toString(), 10)])) {
2933
2955
  var table = this.getContentTable();
2934
2956
  var sHeight = table.scrollHeight;
2935
2957
  var clientHeight = this.getContent().clientHeight;
2936
- this.lastRowBorder(totalRows[i], sHeight <= clientHeight);
2958
+ this.lastRowBorder(totalRows[parseInt(i.toString(), 10)], sHeight <= clientHeight);
2937
2959
  break;
2938
2960
  }
2939
2961
  }
@@ -2947,7 +2969,7 @@ var TreeGrid = /** @class */ (function (_super) {
2947
2969
  if (expandingArgs.requestType === 'collapse' && isCountRequired(this)) {
2948
2970
  var flatDataRecords = this.flatData.slice();
2949
2971
  for (var i = 0; i < flatDataRecords.length; i++) {
2950
- if (flatDataRecords[i]['parentUniqueID'] === expandingArgs.data['uniqueID']) {
2972
+ if (flatDataRecords[parseInt(i.toString(), 10)]['parentUniqueID'] === expandingArgs.data['uniqueID']) {
2951
2973
  flatDataRecords.splice(i, 1);
2952
2974
  i = i - 1;
2953
2975
  }
@@ -2957,7 +2979,7 @@ var TreeGrid = /** @class */ (function (_super) {
2957
2979
  }
2958
2980
  var deff = new Deferred();
2959
2981
  var childDataBind = 'childDataBind';
2960
- expandingArgs[childDataBind] = deff.resolve;
2982
+ expandingArgs["" + childDataBind] = deff.resolve;
2961
2983
  var record = expandingArgs.data;
2962
2984
  this.trigger(events.dataStateChange, expandingArgs);
2963
2985
  deff.promise.then(function () {
@@ -2971,7 +2993,7 @@ var TreeGrid = /** @class */ (function (_super) {
2971
2993
  var currentData = (_this.flatData);
2972
2994
  var index = 0;
2973
2995
  for (var i = 0; i < currentData.length; i++) {
2974
- if (currentData[i].taskData === record.taskData) {
2996
+ if (currentData[parseInt(i.toString(), 10)].taskData === record.taskData) {
2975
2997
  index = i;
2976
2998
  break;
2977
2999
  }
@@ -2988,38 +3010,38 @@ var TreeGrid = /** @class */ (function (_super) {
2988
3010
  }
2989
3011
  });
2990
3012
  }
2991
- if (childData[i]) {
2992
- childData[i].level = record.level + 1;
2993
- childData[i].index = Math.ceil(Math.random() * 1000);
2994
- childData[i].parentItem = extend({}, record);
2995
- childData[i].taskData = extend({}, childData[i]);
2996
- delete childData[i].parentItem.childRecords;
2997
- delete childData[i].taskData.parentItem;
2998
- childData[i].parentUniqueID = record.uniqueID;
2999
- childData[i].uniqueID = getUid(_this.element.id + '_data_');
3000
- setValue('uniqueIDCollection.' + childData[i].uniqueID, childData[i], _this);
3001
- if (!isNullOrUndefined(childData[i][_this.childMapping]) ||
3002
- (childData[i][_this.hasChildMapping] && isCountRequired(_this))) {
3003
- childData[i].hasChildRecords = true;
3013
+ if (childData[parseInt(i.toString(), 10)]) {
3014
+ childData[parseInt(i.toString(), 10)].level = record.level + 1;
3015
+ childData[parseInt(i.toString(), 10)].index = Math.ceil(Math.random() * 1000);
3016
+ childData[parseInt(i.toString(), 10)].parentItem = extend({}, record);
3017
+ childData[parseInt(i.toString(), 10)].taskData = extend({}, childData[parseInt(i.toString(), 10)]);
3018
+ delete childData[parseInt(i.toString(), 10)].parentItem.childRecords;
3019
+ delete childData[parseInt(i.toString(), 10)].taskData.parentItem;
3020
+ childData[parseInt(i.toString(), 10)].parentUniqueID = record.uniqueID;
3021
+ childData[parseInt(i.toString(), 10)].uniqueID = getUid(_this.element.id + '_data_');
3022
+ setValue('uniqueIDCollection.' + childData[parseInt(i.toString(), 10)].uniqueID, childData[parseInt(i.toString(), 10)], _this);
3023
+ if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)][_this.childMapping]) ||
3024
+ (childData[parseInt(i.toString(), 10)][_this.hasChildMapping] && isCountRequired(_this))) {
3025
+ childData[parseInt(i.toString(), 10)].hasChildRecords = true;
3004
3026
  }
3005
- if (isCountRequired(_this) && record[_this.childMapping] && record[_this.childMapping][i]) {
3006
- currentData.splice(index + 1 + i, 0, childData[i]);
3027
+ if (isCountRequired(_this) && record[_this.childMapping] && record[_this.childMapping][parseInt(i.toString(), 10)]) {
3028
+ currentData.splice(index + 1 + i, 0, childData[parseInt(i.toString(), 10)]);
3007
3029
  }
3008
3030
  else {
3009
3031
  currentData.splice(index + 1 + i, record[_this.childMapping] &&
3010
- record[_this.childMapping][i] ? 1 : 0, childData[i]);
3032
+ record[_this.childMapping][parseInt(i.toString(), 10)] ? 1 : 0, childData[parseInt(i.toString(), 10)]);
3011
3033
  }
3012
3034
  }
3013
3035
  else {
3014
3036
  currentData.splice(index + 1 + i, 1);
3015
3037
  }
3016
3038
  }
3017
- currentData[index][_this.childMapping] = childData;
3018
- currentData[index].childRecords = childData;
3019
- currentData[index].expanded = true;
3020
- setValue('uniqueIDCollection.' + currentData[index].uniqueID, currentData[index], _this);
3039
+ currentData[parseInt(index.toString(), 10)]["" + _this.childMapping] = childData;
3040
+ currentData[parseInt(index.toString(), 10)].childRecords = childData;
3041
+ currentData[parseInt(index.toString(), 10)].expanded = true;
3042
+ setValue('uniqueIDCollection.' + currentData[parseInt(index.toString(), 10)].uniqueID, currentData[parseInt(index.toString(), 10)], _this);
3021
3043
  for (var j = 0; j < expandingArgs.childData.length; j++) {
3022
- data_1.push(expandingArgs.childData[j]);
3044
+ data_1.push(expandingArgs.childData[parseInt(j.toString(), 10)]);
3023
3045
  }
3024
3046
  }
3025
3047
  if (isCountRequired(_this) && _this.loadChildOnDemand && expandingArgs.requestType === 'expand') {
@@ -3038,6 +3060,7 @@ var TreeGrid = /** @class */ (function (_super) {
3038
3060
  };
3039
3061
  TreeGrid.prototype.remoteExpand = function (action, row, record) {
3040
3062
  var gridRows = this.getRows();
3063
+ var fetchRemoteChildData = 'fetchRemoteChildData';
3041
3064
  if (this.rowTemplate) {
3042
3065
  var rows_1 = this.getContentTable().rows;
3043
3066
  gridRows = [].slice.call(rows_1);
@@ -3055,6 +3078,9 @@ var TreeGrid = /** @class */ (function (_super) {
3055
3078
  this.trigger(events.expanded, args_1);
3056
3079
  }
3057
3080
  }
3081
+ else if (action === 'collapse' && this.enableVirtualization) {
3082
+ this.dataModule["" + fetchRemoteChildData]({ action: action, record: args.data, rows: null, parentRow: args.row });
3083
+ }
3058
3084
  else {
3059
3085
  this.collapseRemoteChild({ record: record, rows: rows });
3060
3086
  this.setHeightForFrozenContent();
@@ -3081,8 +3107,8 @@ var TreeGrid = /** @class */ (function (_super) {
3081
3107
  if (this.enableImmutableMode && !this.allowPaging) {
3082
3108
  rows = [];
3083
3109
  for (var i = 0; i < childRecords.length; i++) {
3084
- var rowIndex = this.grid.getRowIndexByPrimaryKey(childRecords[i][primaryKeyField]);
3085
- rows.push(this.getRows()[rowIndex]);
3110
+ var rowIndex = this.grid.getRowIndexByPrimaryKey(childRecords[parseInt(i.toString(), 10)]["" + primaryKeyField]);
3111
+ rows.push(this.getRows()[parseInt(rowIndex.toString(), 10)]);
3086
3112
  }
3087
3113
  }
3088
3114
  else {
@@ -3102,42 +3128,49 @@ var TreeGrid = /** @class */ (function (_super) {
3102
3128
  });
3103
3129
  }
3104
3130
  var gridRowsObject = this.grid.getRowsObject();
3105
- if (!isNullOrUndefined(gridRowsObject[this.getCurrentViewRecords().indexOf(record)].visible) && gridRowsObject[this.getCurrentViewRecords().indexOf(record)].visible !== false) {
3106
- gridRowsObject[this.getCurrentViewRecords().indexOf(record)].visible = true;
3131
+ var currentViewData = this.getCurrentViewRecords();
3132
+ var currentRecord = currentViewData.filter(function (e) {
3133
+ return e.uniqueID === record.uniqueID;
3134
+ });
3135
+ var currentIndex = currentViewData.indexOf(currentRecord[0]);
3136
+ if (!isNullOrUndefined(gridRowsObject[currentIndex].visible) && gridRowsObject[currentIndex].visible !== false) {
3137
+ gridRowsObject[currentIndex].visible = true;
3107
3138
  }
3108
3139
  var detailrows = gridRows.filter(function (r) {
3109
3140
  return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
3110
3141
  });
3111
3142
  for (var i = 0; i < rows.length; i++) {
3112
- if (!isNullOrUndefined(rows[i])) {
3113
- rows[i].style.display = displayAction;
3143
+ if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)])) {
3144
+ rows[parseInt(i.toString(), 10)].style.display = displayAction;
3114
3145
  }
3115
- if (!isNullOrUndefined(rows[i]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
3116
- gridRowsObject[rows[i].rowIndex].visible = displayAction != 'none' ? true : false;
3117
- var parentRecord = getValue('uniqueIDCollection.' + record.parentUniqueID, this);
3118
- if (!isNullOrUndefined(parentRecord) && gridRows[this.getCurrentViewRecords().indexOf(parentRecord)].getElementsByClassName('e-treegridcollapse').length) {
3119
- gridRowsObject[this.getCurrentViewRecords().indexOf(record)].visible = false;
3146
+ if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
3147
+ gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction != 'none' ? true : false;
3148
+ var parentRecord = currentViewData.filter(function (e) {
3149
+ return e.uniqueID === currentRecord[0].parentUniqueID;
3150
+ });
3151
+ if (!isNullOrUndefined(parentRecord[0]) && gridRows[currentViewData.indexOf(parentRecord[0])].getElementsByClassName('e-treegridcollapse').length) {
3152
+ gridRowsObject[currentIndex].visible = false;
3120
3153
  }
3121
3154
  }
3122
3155
  if (!isNullOrUndefined(movableRows)) {
3123
- movableRows[i].style.display = displayAction;
3156
+ movableRows[parseInt(i.toString(), 10)].style.display = displayAction;
3124
3157
  }
3125
3158
  if (!isNullOrUndefined(freezeRightRows)) {
3126
- freezeRightRows[i].style.display = displayAction;
3159
+ freezeRightRows[parseInt(i.toString(), 10)].style.display = displayAction;
3127
3160
  }
3128
- this.notify('childRowExpand', { row: rows[i] });
3129
- if ((!isNullOrUndefined(childRecords[i].childRecords) && childRecords[i].childRecords.length > 0) && (action !== 'expand' ||
3130
- isNullOrUndefined(childRecords[i].expanded) || childRecords[i].expanded)) {
3131
- this.expandCollapse(action, rows[i], childRecords[i], true);
3161
+ this.notify('childRowExpand', { row: rows[parseInt(i.toString(), 10)] });
3162
+ if ((!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) && childRecords[parseInt(i.toString(), 10)].childRecords.length > 0) && (action !== 'expand' ||
3163
+ isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].expanded) || childRecords[parseInt(i.toString(), 10)].expanded)) {
3164
+ this.expandCollapse(action, rows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
3132
3165
  if (this.frozenColumns <= this.treeColumnIndex && !isNullOrUndefined(movableRows)) {
3133
- this.expandCollapse(action, movableRows[i], childRecords[i], true);
3166
+ this.expandCollapse(action, movableRows[parseInt(i.toString(), 10)], childRecords[parseInt(i.toString(), 10)], true);
3134
3167
  }
3135
3168
  }
3136
3169
  }
3137
3170
  for (var i = 0; i < detailrows.length; i++) {
3138
- if (!isNullOrUndefined(detailrows[i]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
3139
- gridRowsObject[detailrows[i].rowIndex].visible = displayAction != 'none' ? true : false;
3140
- detailrows[i].style.display = displayAction;
3171
+ if (!isNullOrUndefined(detailrows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
3172
+ gridRowsObject[detailrows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction != 'none' ? true : false;
3173
+ detailrows[parseInt(i.toString(), 10)].style.display = displayAction;
3141
3174
  }
3142
3175
  }
3143
3176
  if (!this.allowPaging && !(this.enableVirtualization || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
@@ -3148,7 +3181,7 @@ var TreeGrid = /** @class */ (function (_super) {
3148
3181
  if (this.enableAltRow && !this.rowTemplate) {
3149
3182
  var visibleRowCount = 0;
3150
3183
  for (var i = 0; rows && i < rows.length; i++) {
3151
- var gridRow = rows[i];
3184
+ var gridRow = rows[parseInt(i.toString(), 10)];
3152
3185
  if (gridRow.style.display !== 'none') {
3153
3186
  if (gridRow.classList.contains('e-altrow')) {
3154
3187
  removeClass([gridRow], 'e-altrow');
@@ -3168,9 +3201,10 @@ var TreeGrid = /** @class */ (function (_super) {
3168
3201
  var rows = this.getContentTable().rows;
3169
3202
  rows = [].slice.call(rows);
3170
3203
  for (var i = 0; i < rows.length; i++) {
3171
- var rcell = this.grid.getContentTable().rows[i].cells[this.treeColumnIndex];
3172
- var row = rows[i];
3173
- var rowData = this.grid.getRowsObject()[i].data;
3204
+ var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
3205
+ .cells[this.treeColumnIndex];
3206
+ var row = rows[parseInt(i.toString(), 10)];
3207
+ var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
3174
3208
  var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
3175
3209
  this.renderModule.cellRender(arg);
3176
3210
  }
@@ -3195,28 +3229,28 @@ var TreeGrid = /** @class */ (function (_super) {
3195
3229
  });
3196
3230
  }
3197
3231
  for (var i = 0; i < rows.length; i++) {
3198
- rows[i].style.display = 'none';
3199
- row = rows[i];
3200
- var collapsingTd = rows[i].querySelector('.e-detailrowexpand');
3232
+ rows[parseInt(i.toString(), 10)].style.display = 'none';
3233
+ row = rows[parseInt(i.toString(), 10)];
3234
+ var collapsingTd = rows[parseInt(i.toString(), 10)].querySelector('.e-detailrowexpand');
3201
3235
  if (!isNullOrUndefined(collapsingTd)) {
3202
3236
  this.grid.detailRowModule.collapse(collapsingTd);
3203
3237
  }
3204
3238
  if (freeze) {
3205
- movablerows[i].style.display = 'none';
3206
- rightrows[i].style.display = 'none';
3207
- if (!rows[i].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3208
- if (movablerows[i].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3209
- row = movablerows[i];
3239
+ movablerows[parseInt(i.toString(), 10)].style.display = 'none';
3240
+ rightrows[parseInt(i.toString(), 10)].style.display = 'none';
3241
+ if (!rows[parseInt(i.toString(), 10)].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3242
+ if (movablerows[parseInt(i.toString(), 10)].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3243
+ row = movablerows[parseInt(i.toString(), 10)];
3210
3244
  }
3211
- else if (rightrows[i].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3212
- row = rightrows[i];
3245
+ else if (rightrows[parseInt(i.toString(), 10)].querySelector('.e-treecolumn-container .e-treegridexpand')) {
3246
+ row = rightrows[parseInt(i.toString(), 10)];
3213
3247
  }
3214
3248
  }
3215
3249
  }
3216
3250
  if (row.querySelector('.e-treecolumn-container .e-treegridexpand')) {
3217
3251
  var expandElement = row.querySelector('.e-treecolumn-container .e-treegridexpand');
3218
- childRecord = this.rowTemplate ? this.grid.getCurrentViewRecords()[rows[i].rowIndex] :
3219
- this.grid.getRowObjectFromUID(rows[i].getAttribute('data-Uid')).data;
3252
+ childRecord = this.rowTemplate ? this.grid.getCurrentViewRecords()[rows[parseInt(i.toString(), 10)].rowIndex] :
3253
+ this.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
3220
3254
  if (!isNullOrUndefined(expandElement) && childRecord.expanded) {
3221
3255
  removeClass([expandElement], 'e-treegridexpand');
3222
3256
  addClass([expandElement], 'e-treegridcollapse');
@@ -3224,8 +3258,8 @@ var TreeGrid = /** @class */ (function (_super) {
3224
3258
  var cRow = [];
3225
3259
  var eRows = this.getRows();
3226
3260
  for (var i_1 = 0; i_1 < eRows.length; i_1++) {
3227
- if (eRows[i_1].querySelector('.e-gridrowindex' + childRecord.index + 'level' + (childRecord.level + 1))) {
3228
- cRow.push(eRows[i_1]);
3261
+ if (eRows[parseInt(i_1.toString(), 10)].querySelector('.e-gridrowindex' + childRecord.index + 'level' + (childRecord.level + 1))) {
3262
+ cRow.push(eRows[parseInt(i_1.toString(), 10)]);
3229
3263
  }
3230
3264
  }
3231
3265
  if (cRow.length && childRecord.expanded) {
@@ -3245,13 +3279,13 @@ var TreeGrid = /** @class */ (function (_super) {
3245
3279
  TreeGrid.prototype.updateRowAndCellElements = function (records, rows, index) {
3246
3280
  for (var i = 0; i < records.length; i++) {
3247
3281
  this.renderModule.cellRender({
3248
- data: records[i], cell: rows[i].cells[index],
3282
+ data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
3249
3283
  column: this.grid.getColumns()[this.treeColumnIndex],
3250
3284
  requestType: 'rowDragAndDrop'
3251
3285
  });
3252
3286
  if (this['action'] === 'indenting' || this['action'] === 'outdenting') {
3253
3287
  this.renderModule.RowModifier({
3254
- data: records[i], row: rows[i]
3288
+ data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
3255
3289
  });
3256
3290
  }
3257
3291
  }
@@ -3554,11 +3588,11 @@ var TreeGrid = /** @class */ (function (_super) {
3554
3588
  };
3555
3589
  TreeGrid.prototype.getFrozenCount = function (cols, cnt) {
3556
3590
  for (var j = 0, len = cols.length; j < len; j++) {
3557
- if (cols[j].columns) {
3558
- cnt = this.getFrozenCount(cols[j].columns, cnt);
3591
+ if (cols[parseInt(j.toString(), 10)].columns) {
3592
+ cnt = this.getFrozenCount(cols[parseInt(j.toString(), 10)].columns, cnt);
3559
3593
  }
3560
3594
  else {
3561
- if (cols[j].isFrozen) {
3595
+ if (cols[parseInt(j.toString(), 10)].isFrozen) {
3562
3596
  cnt++;
3563
3597
  }
3564
3598
  }
@@ -3793,6 +3827,12 @@ var TreeGrid = /** @class */ (function (_super) {
3793
3827
  __decorate([
3794
3828
  Property('auto')
3795
3829
  ], TreeGrid.prototype, "width", void 0);
3830
+ __decorate([
3831
+ Complex({}, LoadingIndicator)
3832
+ ], TreeGrid.prototype, "loadingIndicator", void 0);
3833
+ __decorate([
3834
+ Property(true)
3835
+ ], TreeGrid.prototype, "enableVirtualMaskRow", void 0);
3796
3836
  __decorate([
3797
3837
  Property(false)
3798
3838
  ], TreeGrid.prototype, "enableVirtualization", void 0);