@syncfusion/ej2-treegrid 28.2.6 → 29.1.37

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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-treegrid.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js +2 -2
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +1281 -519
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +1283 -519
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +2 -2
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +10 -10
  13. package/src/treegrid/actions/batch-edit.js +12 -5
  14. package/src/treegrid/actions/edit.js +12 -12
  15. package/src/treegrid/actions/page.js +1 -1
  16. package/src/treegrid/actions/rowdragdrop.d.ts +21 -1
  17. package/src/treegrid/actions/rowdragdrop.js +252 -48
  18. package/src/treegrid/actions/summary.js +1 -1
  19. package/src/treegrid/actions/virtual-scroll.d.ts +34 -1
  20. package/src/treegrid/actions/virtual-scroll.js +58 -11
  21. package/src/treegrid/base/constant.d.ts +0 -4
  22. package/src/treegrid/base/constant.js +0 -4
  23. package/src/treegrid/base/data.js +47 -46
  24. package/src/treegrid/base/treegrid-model.d.ts +195 -208
  25. package/src/treegrid/base/treegrid.d.ts +598 -411
  26. package/src/treegrid/base/treegrid.js +526 -307
  27. package/src/treegrid/enum.d.ts +77 -80
  28. package/src/treegrid/enum.js +2 -2
  29. package/src/treegrid/models/column.d.ts +122 -177
  30. package/src/treegrid/models/column.js +14 -26
  31. package/src/treegrid/models/edit-settings-model.d.ts +24 -25
  32. package/src/treegrid/models/edit-settings.d.ts +25 -26
  33. package/src/treegrid/models/edit-settings.js +1 -1
  34. package/src/treegrid/models/filter-settings-model.d.ts +41 -49
  35. package/src/treegrid/models/filter-settings.d.ts +43 -51
  36. package/src/treegrid/models/filter-settings.js +2 -2
  37. package/src/treegrid/models/infinite-scroll-settings-model.d.ts +4 -4
  38. package/src/treegrid/models/infinite-scroll-settings.d.ts +4 -4
  39. package/src/treegrid/models/infinite-scroll-settings.js +1 -1
  40. package/src/treegrid/models/loading-indicator-model.d.ts +3 -4
  41. package/src/treegrid/models/loading-indicator.d.ts +4 -4
  42. package/src/treegrid/models/loading-indicator.js +1 -1
  43. package/src/treegrid/models/page-settings-model.d.ts +10 -13
  44. package/src/treegrid/models/page-settings.d.ts +11 -14
  45. package/src/treegrid/models/page-settings.js +1 -1
  46. package/src/treegrid/models/rowdrop-settings-model.d.ts +1 -1
  47. package/src/treegrid/models/rowdrop-settings.d.ts +13 -6
  48. package/src/treegrid/models/rowdrop-settings.js +1 -1
  49. package/src/treegrid/models/search-settings-model.d.ts +13 -11
  50. package/src/treegrid/models/search-settings.d.ts +14 -12
  51. package/src/treegrid/models/search-settings.js +1 -1
  52. package/src/treegrid/models/selection-settings-model.d.ts +18 -29
  53. package/src/treegrid/models/selection-settings.d.ts +18 -29
  54. package/src/treegrid/models/sort-settings-model.d.ts +8 -5
  55. package/src/treegrid/models/sort-settings.d.ts +10 -7
  56. package/src/treegrid/models/sort-settings.js +2 -2
  57. package/src/treegrid/models/summary-model.d.ts +28 -29
  58. package/src/treegrid/models/summary.d.ts +32 -30
  59. package/src/treegrid/models/summary.js +4 -1
  60. package/src/treegrid/models/textwrap-settings-model.d.ts +7 -4
  61. package/src/treegrid/models/textwrap-settings.d.ts +8 -5
  62. package/src/treegrid/models/textwrap-settings.js +1 -1
  63. package/src/treegrid/renderer/render.js +11 -5
  64. package/src/treegrid/renderer/virtual-row-model-generator.js +5 -4
  65. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +277 -0
  66. package/src/treegrid/renderer/virtual-tree-content-render.js +328 -35
  67. package/src/treegrid/utils.d.ts +1 -1
  68. package/styles/bootstrap-lite.css +0 -12
  69. package/styles/bootstrap.css +0 -12
  70. package/styles/bootstrap5-dark-lite.css +1 -1
  71. package/styles/bootstrap5-dark.css +1 -1
  72. package/styles/treegrid/_layout.scss +0 -1
  73. package/styles/treegrid/_material-dark-definition.scss +2 -2
  74. package/styles/treegrid/_material-definition.scss +2 -2
  75. package/styles/treegrid/bootstrap.css +0 -12
  76. package/styles/treegrid/bootstrap5-dark.css +1 -1
  77. package/styles/treegrid/icons/_bootstrap.scss +0 -17
  78. package/styles/treegrid/icons/_bootstrap5.scss +1 -1
  79. package/styles/treegrid/icons/_fabric-dark.scss +1 -1
  80. package/styles/treegrid/icons/_fabric.scss +1 -1
  81. package/styles/treegrid/icons/_fluent2.scss +1 -1
  82. package/styles/treegrid/icons/_fusionnew.scss +1 -0
  83. package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
  84. package/styles/treegrid/icons/_tailwind-dark.scss +2 -2
@@ -114,13 +114,13 @@ var TreeGrid = /** @class */ (function (_super) {
114
114
  }
115
115
  TreeGrid_1 = TreeGrid;
116
116
  /**
117
- * Export TreeGrid data to Excel file(.xlsx).
117
+ * Exports the TreeGrid data to an Excel file (.xlsx).
118
118
  *
119
- * @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - Defines the export properties of the Tree Grid.
120
- * @param {boolean} isMultipleExport - Define to enable multiple export.
121
- * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.
122
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
123
- * @returns {Promise<any>} - Returns promise object of export action
119
+ * @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - The properties used to configure the Excel export.
120
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
121
+ * @param {workbook} workbook - The workbook instance used for multiple exports.
122
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
123
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
124
124
  */
125
125
  /* eslint-disable */
126
126
  TreeGrid.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
@@ -128,13 +128,13 @@ var TreeGrid = /** @class */ (function (_super) {
128
128
  return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, false);
129
129
  };
130
130
  /**
131
- * Export TreeGrid data to CSV file.
131
+ * Exports the TreeGrid data to a CSV file.
132
132
  *
133
- * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the TreeGrid.
134
- * @param {boolean} isMultipleExport - Define to enable multiple export.
135
- * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.
136
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
137
- * @returns {Promise<any>} - Returns promise object of export action
133
+ * @param {ExcelExportProperties} excelExportProperties - The properties used to configure the CSV export.
134
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
135
+ * @param {workbook} workbook - The workbook instance used for multiple exports.
136
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
137
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
138
138
  */
139
139
  /* eslint-disable */
140
140
  TreeGrid.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
@@ -142,21 +142,21 @@ var TreeGrid = /** @class */ (function (_super) {
142
142
  return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, true);
143
143
  };
144
144
  /**
145
- * Export TreeGrid data to PDF document.
145
+ * Exports the TreeGrid data to a PDF document.
146
146
  *
147
- * @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - Defines the export properties of the Tree Grid.
148
- * @param {boolean} isMultipleExport - Define to enable multiple export.
149
- * @param {Object} pdfDoc - Defined the Pdf Document if multiple export is enabled.
150
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
151
- * @returns {Promise<any>} - Returns promise object of export action
147
+ * @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - The properties used to configure the PDF export.
148
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
149
+ * @param {Object} pdfDoc - The PDF document instance used for multiple exports.
150
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
151
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
152
152
  */
153
153
  TreeGrid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
154
154
  return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
155
155
  };
156
156
  /**
157
- * Sends a post request to export tree grid to excel file in server side.
157
+ * Sends a POST request to export the TreeGrid to an Excel file on the server side.
158
158
  *
159
- * @param {string} url - Pass URL for server side excel export action.
159
+ * @param {string} url - The URL for the server-side Excel export action.
160
160
  * @returns {void}
161
161
  */
162
162
  TreeGrid.prototype.serverExcelExport = function (url) {
@@ -164,9 +164,9 @@ var TreeGrid = /** @class */ (function (_super) {
164
164
  this.exportTreeGrid(url);
165
165
  };
166
166
  /**
167
- * Sends a post request to export tree grid to pdf file in server side.
167
+ * Sends a POST request to export the TreeGrid to a PDF document on the server side.
168
168
  *
169
- * @param {string} url - Pass URL for server-side pdf export action.
169
+ * @param {string} url - The URL for the server-side PDF export action.
170
170
  * @returns {void}
171
171
  */
172
172
  TreeGrid.prototype.serverPdfExport = function (url) {
@@ -174,9 +174,9 @@ var TreeGrid = /** @class */ (function (_super) {
174
174
  this.exportTreeGrid(url);
175
175
  };
176
176
  /**
177
- * Sends a Post request to export Tree Grid to CSV file in server side.
177
+ * Sends a POST request to export the TreeGrid to a CSV file on the server side.
178
178
  *
179
- * @param {string} url - Pass URL for server-side csv export action.
179
+ * @param {string} url - The URL for the server-side CSV export action.
180
180
  * @returns {void}
181
181
  */
182
182
  TreeGrid.prototype.serverCsvExport = function (url) {
@@ -204,7 +204,8 @@ var TreeGrid = /** @class */ (function (_super) {
204
204
  treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
205
205
  treeGridModel.sortSettings.columns = queries.sorted;
206
206
  treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
207
- var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });
207
+ var form = this.createElement('form', { id: 'ExportForm' });
208
+ form.style.display = 'none';
208
209
  var treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
209
210
  treeGridInput.value = JSON.stringify(treeGridModel);
210
211
  form.method = 'POST';
@@ -295,11 +296,11 @@ var TreeGrid = /** @class */ (function (_super) {
295
296
  }
296
297
  };
297
298
  /**
298
- * Sorts a column with the given options.
299
+ * Sorts a column with the specified options.
299
300
  *
300
- * @param {string} columnName - Defines the column name to be sorted.
301
- * @param {SortDirection} direction - Defines the direction of sorting field.
302
- * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.
301
+ * @param {string} columnName - The name of the column to be sorted.
302
+ * @param {SortDirection} direction - The direction of the sorting operation.
303
+ * @param {boolean} isMultiSort - Specifies whether previous sorted columns should be maintained during sorting.
303
304
  * @returns {void}
304
305
  */
305
306
  TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
@@ -308,7 +309,7 @@ var TreeGrid = /** @class */ (function (_super) {
308
309
  }
309
310
  };
310
311
  /**
311
- * Clears all the sorted columns of the TreeGrid.
312
+ * Clears all the sorted columns in the TreeGrid.
312
313
  *
313
314
  * @returns {void}
314
315
  */
@@ -318,9 +319,9 @@ var TreeGrid = /** @class */ (function (_super) {
318
319
  }
319
320
  };
320
321
  /**
321
- * Remove sorted column by field name.
322
+ * Removes the sorted state from a column specified by the field name.
322
323
  *
323
- * @param {string} field - Defines the column field name to remove sort.
324
+ * @param {string} field - The field name of the column from which the sort state should be removed.
324
325
  * @returns {void}
325
326
  * @hidden
326
327
  */
@@ -330,36 +331,32 @@ var TreeGrid = /** @class */ (function (_super) {
330
331
  }
331
332
  };
332
333
  /**
333
- * Searches TreeGrid records using the given key.
334
- * You can customize the default search option by using the
335
- * [`searchSettings`](./#searchsettings/).
334
+ * Searches for TreeGrid records using a specified search string.
335
+ * Customize the search behavior through the [searchSettings](./#searchsettings/).
336
336
  *
337
- * @param {string} searchString - Defines the key.
337
+ * @param {string} searchString - The string used as the search key.
338
338
  * @returns {void}
339
339
  */
340
340
  TreeGrid.prototype.search = function (searchString) {
341
341
  this.grid.search(searchString);
342
342
  };
343
343
  /**
344
- * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.
345
- * > * This method ignores the hidden columns.
346
- * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.
344
+ * Adjusts column widths to fit their content, ensuring content is displayed without wrapping or truncation.
345
+ * - Hidden columns are ignored by this method.
346
+ * - Use the `autoFitColumns` method during the `dataBound` event for initial rendering.
347
347
  *
348
- * @param {string |string[]} fieldNames - Defines the column names.
348
+ * @param {string | string[]} fieldNames - The name(s) of the column(s) to be auto-fitted.
349
349
  * @returns {void}
350
- *
351
- *
352
- *
353
350
  */
354
351
  TreeGrid.prototype.autoFitColumns = function (fieldNames) {
355
352
  this.resizeModule.autoFitColumns(fieldNames);
356
353
  this.updateColumnModel();
357
354
  };
358
355
  /**
359
- * Changes the TreeGrid column positions by field names.
356
+ * Reorders TreeGrid columns by specifying their field names.
360
357
  *
361
- * @param {string} fromFName - Defines the origin field name.
362
- * @param {string} toFName - Defines the destination field name.
358
+ * @param {string | string[]} fromFName - The field name(s) of the column(s) to be moved.
359
+ * @param {string} toFName - The destination field name to place the moved columns.
363
360
  * @returns {void}
364
361
  */
365
362
  TreeGrid.prototype.reorderColumns = function (fromFName, toFName) {
@@ -382,9 +379,8 @@ var TreeGrid = /** @class */ (function (_super) {
382
379
  }
383
380
  };
384
381
  /**
385
- * By default, prints all the pages of the TreeGrid and hides the pager.
386
- * > You can customize print options using the
387
- * [`printMode`](./#printmode).
382
+ * Prints all the pages of the TreeGrid and hides the pager by default.
383
+ * Customize print options using the [printMode](./#printmode).
388
384
  *
389
385
  * @returns {void}
390
386
  */
@@ -528,7 +524,7 @@ var TreeGrid = /** @class */ (function (_super) {
528
524
  this.isSelfReference = !isNullOrUndefined(this.parentIdMapping);
529
525
  };
530
526
  /**
531
- * Binding events to the element while component creation.
527
+ * Attaches event handlers to the necessary elements during the component's initialization.
532
528
  *
533
529
  * @hidden
534
530
  * @returns {void}
@@ -546,9 +542,12 @@ var TreeGrid = /** @class */ (function (_super) {
546
542
  }
547
543
  };
548
544
  /**
549
- * To provide the array of modules needed for component rendering
545
+ * Provides a list of the modules that are required for rendering the TreeGrid component.
550
546
  *
551
- * @returns {ModuleDeclaration[]} - Returns TreeGrid modules collection
547
+ * This method is essential for ensuring that all dependent modules are loaded and available
548
+ * during the component's lifecycle, enabling full functionality.
549
+ *
550
+ * @returns {ModuleDeclaration[]} - Returns an array of the required TreeGrid module declarations.
552
551
  * @hidden
553
552
  */
554
553
  TreeGrid.prototype.requiredModules = function () {
@@ -865,7 +864,7 @@ var TreeGrid = /** @class */ (function (_super) {
865
864
  if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
866
865
  failureCases.push('Virtual scrolling is not compatible with the detail template');
867
866
  }
868
- if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }) || this.frozenRows > 0)
867
+ if ((this.frozenColumns > 0 || this.frozenRows > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }))
869
868
  && (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
870
869
  failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
871
870
  }
@@ -875,9 +874,6 @@ var TreeGrid = /** @class */ (function (_super) {
875
874
  if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
876
875
  failureCases.push('Selection is not supported in RowTemplate');
877
876
  }
878
- if (this.treeColumnIndex < 0) {
879
- failureCases.push('For showing tree structure it is must to set the TreeColumnIndex value.');
880
- }
881
877
  if (this.treeColumnIndex >= this.columns.length) {
882
878
  failureCases.push('TreeColumnIndex value should not exceed the total column count.');
883
879
  }
@@ -903,9 +899,12 @@ var TreeGrid = /** @class */ (function (_super) {
903
899
  failureCases.push('Only one column can have the ShowCheckbox option enabled.');
904
900
  }
905
901
  }
906
- var alignColumn = this.columnModel.filter(function (col) { return col.textAlign === 'Right' && col.field === _this.columnModel[_this.treeColumnIndex].field; });
907
- if (alignColumn.length !== 0) {
908
- failureCases.push('TextAlign right for the tree column is not applicable.');
902
+ var alignColumn;
903
+ if (this.treeColumnIndex !== null && this.treeColumnIndex !== -1) {
904
+ alignColumn = this.columnModel.filter(function (col) { return col.textAlign === 'Right' && col.field === _this.columnModel[_this.treeColumnIndex].field; });
905
+ if (alignColumn.length !== 0) {
906
+ failureCases.push('TextAlign right for the tree column is not applicable.');
907
+ }
909
908
  }
910
909
  if (failureCases.length > 0) {
911
910
  var failureEventArgs_1 = {
@@ -941,7 +940,7 @@ var TreeGrid = /** @class */ (function (_super) {
941
940
  this.flatData = data;
942
941
  this.flatData.filter(function (e) {
943
942
  setValue('uniqueIDCollection.' + e.uniqueID, e, _this);
944
- if (e.level === 0) {
943
+ if (e.level === 0 && !_this.parentData.some(function (record) { return record.uniqueID === e.uniqueID; })) {
945
944
  _this.parentData.push(e);
946
945
  }
947
946
  });
@@ -1075,14 +1074,8 @@ var TreeGrid = /** @class */ (function (_super) {
1075
1074
  _this.trigger(events.rowDeselecting, args);
1076
1075
  };
1077
1076
  this.grid.rowSelected = function (args) {
1078
- if (_this.enableVirtualization && args.isHeaderCheckboxClicked &&
1079
- _this.grid.currentViewData.length !== _this.grid.selectionModule.selectedRowIndexes.length) {
1080
- var updateRowSelection = 'updateRowSelection';
1081
- for (var i = 0; i < _this.getRows().length; i++) {
1082
- if (_this.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
1083
- _this.grid.selectionModule["" + updateRowSelection](_this.getRows()[parseInt(i.toString(), 10)], _this.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
1084
- }
1085
- }
1077
+ if (_this.enableVirtualization) {
1078
+ _this.virtualScrollModule.updateSelection(args);
1086
1079
  }
1087
1080
  _this.selectedRowIndex = _this.grid.selectedRowIndex;
1088
1081
  _this.notify(events.rowSelected, args);
@@ -1824,6 +1817,14 @@ var TreeGrid = /** @class */ (function (_super) {
1824
1817
  }
1825
1818
  return gridColumnCollection;
1826
1819
  };
1820
+ TreeGrid.prototype.lastRowCellBorderUpdated = function () {
1821
+ var rows = this.getContentTable().querySelectorAll('tr.e-row');
1822
+ var visibleRows = Array.from(rows).filter(function (row) { return !row.classList.contains('e-childrow-hidden'); });
1823
+ if (visibleRows.length > 0) {
1824
+ var lastVisibleRow = visibleRows[visibleRows.length - 1];
1825
+ this.lastRowBorder(lastVisibleRow, true);
1826
+ }
1827
+ };
1827
1828
  /**
1828
1829
  * Called internally if any of the property value changed.
1829
1830
  *
@@ -2049,7 +2050,11 @@ var TreeGrid = /** @class */ (function (_super) {
2049
2050
  this.grid.refreshColumns();
2050
2051
  };
2051
2052
  /**
2052
- * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).
2053
+ * Destroys the TreeGrid component by detaching event handlers,
2054
+ * removing attributes and classes, and clearing the component's DOM elements.
2055
+ *
2056
+ * This method ensures that all resources used by the TreeGrid are properly released
2057
+ * and the component is cleaned up from the DOM to prevent memory leaks.
2053
2058
  *
2054
2059
  * @method destroy
2055
2060
  * @returns {void}
@@ -2087,7 +2092,8 @@ var TreeGrid = /** @class */ (function (_super) {
2087
2092
  this.grid = null;
2088
2093
  };
2089
2094
  /**
2090
- * Update the TreeGrid model
2095
+ * Updates the TreeGrid model and ensures that the underlying Grid's data model is in sync with TreeGrid.
2096
+ * This method binds current data and settings to the TreeGrid.
2091
2097
  *
2092
2098
  * @method dataBind
2093
2099
  * @returns {void}
@@ -2106,7 +2112,10 @@ var TreeGrid = /** @class */ (function (_super) {
2106
2112
  this.grid.dataBind();
2107
2113
  };
2108
2114
  /**
2109
- * Get the properties to be maintained in the persisted state.
2115
+ * Retrieves the properties of the TreeGrid that should be retained and persisted between sessions.
2116
+ *
2117
+ * The method ensures that user preferences and important settings like paging, sorting, filtering,
2118
+ * column configurations, etc., are preserved and can be restored when the component is re-initialized.
2110
2119
  *
2111
2120
  * @returns {string} - Returns persist properties details
2112
2121
  * @hidden
@@ -2198,7 +2207,9 @@ var TreeGrid = /** @class */ (function (_super) {
2198
2207
  }
2199
2208
  };
2200
2209
  /**
2201
- * Returns TreeGrid rows
2210
+ * Retrieves all the TreeGrid row elements.
2211
+ *
2212
+ * This method is useful for accessing the HTML representation of the rows for further manipulation or inspection.
2202
2213
  *
2203
2214
  * @returns {HTMLTableRowElement[]} - Returns row elements collection
2204
2215
  */
@@ -2206,7 +2217,9 @@ var TreeGrid = /** @class */ (function (_super) {
2206
2217
  return this.grid.getRows();
2207
2218
  };
2208
2219
  /**
2209
- * Gets the pager of the TreeGrid.
2220
+ * Obtains the pager element of the TreeGrid.
2221
+ *
2222
+ * The pager enables navigation between pages when the TreeGrid displays paginated data.
2210
2223
  *
2211
2224
  * @returns {Element} - Returns pager element
2212
2225
  */
@@ -2214,12 +2227,14 @@ var TreeGrid = /** @class */ (function (_super) {
2214
2227
  return this.grid.getPager(); //get element from pager
2215
2228
  };
2216
2229
  /**
2217
- * Adds a new record to the TreeGrid. Without passing parameters, it adds empty rows.
2218
- * > `editSettings.allowEditing` should be true.
2230
+ * Adds a new record to the TreeGrid at the specified position or default location.
2231
+ *
2232
+ * @param {Object} data - Object containing the data for the new record. If omitted, an empty row is added.
2233
+ * @param {number} index - The index at which the new row should be added.
2234
+ * @param {RowPosition} position - Specifies the position of the new row (e.g., before, after or child).
2235
+ *
2236
+ * > Requires `editSettings.allowAdding` to be true.
2219
2237
  *
2220
- * @param {Object} data - Defines the new add record data.
2221
- * @param {number} index - Defines the row index to be added.
2222
- * @param {RowPosition} position - Defines the new row position to be added.
2223
2238
  * @returns {void}
2224
2239
  */
2225
2240
  TreeGrid.prototype.addRecord = function (data, index, position) {
@@ -2230,7 +2245,9 @@ var TreeGrid = /** @class */ (function (_super) {
2230
2245
  }
2231
2246
  };
2232
2247
  /**
2233
- * Cancels edited state.
2248
+ * Cancels the current edit operation on the TreeGrid.
2249
+ *
2250
+ * This method discards changes made to the row and exits the edit mode without saving.
2234
2251
  *
2235
2252
  * @returns {void}
2236
2253
  */
@@ -2240,7 +2257,9 @@ var TreeGrid = /** @class */ (function (_super) {
2240
2257
  }
2241
2258
  };
2242
2259
  /**
2243
- * Saves the cell that is currently edited. It does not save the value to the DataSource.
2260
+ * Saves the current cell value changes without committing to the data source.
2261
+ *
2262
+ * This operation persists the changes in the UI but not in the underlying data model.
2244
2263
  *
2245
2264
  * @returns {void}
2246
2265
  */
@@ -2250,7 +2269,9 @@ var TreeGrid = /** @class */ (function (_super) {
2250
2269
  }
2251
2270
  };
2252
2271
  /**
2253
- * To update the specified cell by given value without changing into edited state.
2272
+ * Updates the value of a specific cell directly, bypassing the edit mode.
2273
+ *
2274
+ * This method provides a quick way to update the UI and data without user interaction.
2254
2275
  *
2255
2276
  * @param {number} rowIndex Defines the row index.
2256
2277
  * @param {string} field Defines the column field.
@@ -2263,10 +2284,12 @@ var TreeGrid = /** @class */ (function (_super) {
2263
2284
  }
2264
2285
  };
2265
2286
  /**
2266
- * To update the specified row by given values without changing into edited state.
2287
+ * Updates a specific row with given values directly, skipping the edit state.
2288
+ *
2289
+ * This method allows for bulk updates of row data programmatically.
2267
2290
  *
2268
- * @param {number} index Defines the row index.
2269
- * @param {Object} data Defines the data object to be updated.
2291
+ * @param {number} index - The index of the row to update.
2292
+ * @param {Object} data - The data object containing updated field values.
2270
2293
  * @returns {void}
2271
2294
  */
2272
2295
  TreeGrid.prototype.updateRow = function (index, data) {
@@ -2282,12 +2305,13 @@ var TreeGrid = /** @class */ (function (_super) {
2282
2305
  }
2283
2306
  };
2284
2307
  /**
2285
- * Delete a record with Given options. If fieldName and data is not given then TreeGrid will delete the selected record.
2286
- * > `editSettings.allowDeleting` should be true.
2308
+ * Deletes a record based on specified criteria or the selected record if none specified.
2287
2309
  *
2288
- * @param {string} fieldName - Defines the primary key field, 'Name of the column'.
2289
- * @param {Object} data - Defines the JSON data of the record to be deleted.
2310
+ * @param {string} fieldName - The name of the primary key field.
2311
+ * @param {Object} data - The data object representing the record to delete.
2290
2312
  * @returns {void}
2313
+ *
2314
+ * > Requires `editSettings.allowDeleting` to be true.
2291
2315
  */
2292
2316
  TreeGrid.prototype.deleteRecord = function (fieldName, data) {
2293
2317
  if ((isNullOrUndefined(fieldName) && (isNullOrUndefined(data)) || (this.getSelectedRecords().length <= 0))) {
@@ -2299,9 +2323,11 @@ var TreeGrid = /** @class */ (function (_super) {
2299
2323
  }
2300
2324
  };
2301
2325
  /**
2302
- * To edit any particular row by TR element.
2326
+ * Initiates editing for a specific row using its HTML element.
2327
+ *
2328
+ * This allows for manual control of which row enters edit mode through the UI.
2303
2329
  *
2304
- * @param {HTMLTableRowElement} row - Defines the table row to be edited.
2330
+ * @param {HTMLTableRowElement} row - The table row element to enter into edit mode.
2305
2331
  * @returns {void}
2306
2332
  */
2307
2333
  TreeGrid.prototype.startEdit = function (row) {
@@ -2310,10 +2336,12 @@ var TreeGrid = /** @class */ (function (_super) {
2310
2336
  }
2311
2337
  };
2312
2338
  /**
2313
- * To edit any particular cell using row index and cell index.
2339
+ * Begins editing of a specific cell using row and field indices.
2340
+ *
2341
+ * Customers can programmatically specify which cell to edit without user input.
2314
2342
  *
2315
- * @param {number} rowIndex - Defines row index to edit a particular cell.
2316
- * @param {string} field - Defines the field name of the column to perform cell edit.
2343
+ * @param {number} rowIndex - The index of the row containing the cell.
2344
+ * @param {string} field - The field name of the cell to edit.
2317
2345
  * @returns {void}
2318
2346
  */
2319
2347
  TreeGrid.prototype.editCell = function (rowIndex, field) {
@@ -2322,10 +2350,12 @@ var TreeGrid = /** @class */ (function (_super) {
2322
2350
  }
2323
2351
  };
2324
2352
  /**
2325
- * Enables or disables ToolBar items.
2353
+ * Enables or disables specified ToolBar items within the TreeGrid.
2326
2354
  *
2327
- * @param {string[]} items - Defines the collection of itemID of ToolBar items.
2328
- * @param {boolean} isEnable - Defines the items to be enabled or disabled.
2355
+ * This facilitates dynamic control of toolbar actions based on application logic.
2356
+ *
2357
+ * @param {string[]} items - Array of ToolBar item IDs to enable or disable.
2358
+ * @param {boolean} isEnable - Boolean flag to determine whether to enable (true) or disable (false) items.
2329
2359
  * @returns {void}
2330
2360
  */
2331
2361
  TreeGrid.prototype.enableToolbarItems = function (items, isEnable) {
@@ -2334,7 +2364,9 @@ var TreeGrid = /** @class */ (function (_super) {
2334
2364
  }
2335
2365
  };
2336
2366
  /**
2337
- * If TreeGrid is in editable state, you can save a record by invoking endEdit.
2367
+ * Commits the edits made to a record in edit mode, updating the data source.
2368
+ *
2369
+ * Use this method to finalize changes for rows in edit mode, ensuring persistence.
2338
2370
  *
2339
2371
  * @returns {void}
2340
2372
  */
@@ -2344,10 +2376,12 @@ var TreeGrid = /** @class */ (function (_super) {
2344
2376
  }
2345
2377
  };
2346
2378
  /**
2347
- * Column chooser can be displayed on screen by given position(X and Y axis).
2379
+ * Displays the column chooser at a specified screen position.
2348
2380
  *
2349
- * @param {number} x - Defines the X axis.
2350
- * @param {number} y - Defines the Y axis.
2381
+ * Useful for customizing the visibility of columns interactively via the UI.
2382
+ *
2383
+ * @param {number} x - The X-axis position of the column chooser.
2384
+ * @param {number} y - The Y-axis position of the column chooser.
2351
2385
  * @returns {void}
2352
2386
  */
2353
2387
  TreeGrid.prototype.openColumnChooser = function (x, y) {
@@ -2356,9 +2390,11 @@ var TreeGrid = /** @class */ (function (_super) {
2356
2390
  }
2357
2391
  };
2358
2392
  /**
2359
- * Delete any visible row by TR element.
2393
+ * Deletes a visible row from the TreeGrid using its HTML element.
2394
+ *
2395
+ * Apply this method when handling row deletions through DOM manipulations.
2360
2396
  *
2361
- * @param {HTMLTableRowElement} tr - Defines the table row element.
2397
+ * @param {HTMLTableRowElement} tr - The table row element to remove.
2362
2398
  * @returns {void}
2363
2399
  */
2364
2400
  TreeGrid.prototype.deleteRow = function (tr) {
@@ -2367,20 +2403,23 @@ var TreeGrid = /** @class */ (function (_super) {
2367
2403
  }
2368
2404
  };
2369
2405
  /**
2370
- * Get the names of the primary key columns of the TreeGrid.
2406
+ * Retrieves the primary key field names used in the TreeGrid.
2407
+ *
2408
+ * This information is crucial for identifying and manipulating unique rows.
2371
2409
  *
2372
- * @returns {string[]} - Returns primary key collection
2410
+ * @returns {string[]} - Returns an array of primary key field names.
2373
2411
  */
2374
2412
  TreeGrid.prototype.getPrimaryKeyFieldNames = function () {
2375
2413
  return this.grid.getPrimaryKeyFieldNames();
2376
2414
  };
2377
2415
  /**
2378
- * Updates particular cell value based on the given primary key value.
2379
- * > Primary key column must be specified using `columns.isPrimaryKey` property.
2416
+ * Updates the value of a specific cell using its primary key for identification.
2380
2417
  *
2381
- * @param {string| number} key - Specifies the PrimaryKey value of dataSource.
2382
- * @param {string } field - Specifies the field name which you want to update.
2383
- * @param {string | number | boolean | Date} value - To update new value for the particular cell.
2418
+ * Useful for targeted updates that leverage unique identifiers to ensure accuracy.
2419
+ *
2420
+ * @param {string| number} key - The primary key value of the row containing the cell.
2421
+ * @param {string} field - The field name of the cell to update.
2422
+ * @param {string | number | boolean | Date} value - The new value to assign to the specified cell.
2384
2423
  * @returns {void}
2385
2424
  */
2386
2425
  TreeGrid.prototype.setCellValue = function (key, field, value) {
@@ -2390,11 +2429,12 @@ var TreeGrid = /** @class */ (function (_super) {
2390
2429
  editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
2391
2430
  };
2392
2431
  /**
2393
- * Updates and refresh the particular row values based on the given primary key value.
2394
- * > Primary key column must be specified using `columns.isPrimaryKey` property.
2432
+ * Updates the data for a specific row identified by its primary key and refreshes the display.
2433
+ *
2434
+ * Important for keeping the displayed data consistent with the source database or dataset.
2395
2435
  *
2396
- * @param {string| number} key - Specifies the PrimaryKey value of dataSource.
2397
- * @param {Object} rowData - To update new data for the particular row.
2436
+ * @param {string| number} key - The primary key value of the row to update.
2437
+ * @param {Object} rowData - The new data to apply to the row.
2398
2438
  * @returns {void}
2399
2439
  */
2400
2440
  TreeGrid.prototype.setRowData = function (key, rowData) {
@@ -2432,9 +2472,12 @@ var TreeGrid = /** @class */ (function (_super) {
2432
2472
  }
2433
2473
  };
2434
2474
  /**
2435
- * Navigates to the specified target page.
2475
+ * Navigates to a specified page number within the TreeGrid pagination.
2436
2476
  *
2437
- * @param {number} pageNo - Defines the page number to navigate.
2477
+ * This can be used to programmatically change the page being viewed,
2478
+ * allowing for scripted navigation through data.
2479
+ *
2480
+ * @param {number} pageNo - The page number to navigate to. Must be within valid page range.
2438
2481
  * @returns {void}
2439
2482
  */
2440
2483
  TreeGrid.prototype.goToPage = function (pageNo) {
@@ -2443,9 +2486,12 @@ var TreeGrid = /** @class */ (function (_super) {
2443
2486
  }
2444
2487
  };
2445
2488
  /**
2446
- * Defines the text of external message.
2489
+ * Updates the external message displayed within the pager component.
2490
+ *
2491
+ * This is useful for showing custom messages or additional information
2492
+ * related to the data set or pagination status.
2447
2493
  *
2448
- * @param {string} message - Defines the message to update.
2494
+ * @param {string} message - The custom message to display in the pager.
2449
2495
  * @returns {void}
2450
2496
  */
2451
2497
  TreeGrid.prototype.updateExternalMessage = function (message) {
@@ -2454,20 +2500,26 @@ var TreeGrid = /** @class */ (function (_super) {
2454
2500
  }
2455
2501
  };
2456
2502
  /**
2457
- * Gets a cell by row and column index.
2503
+ * Retrieves a cell element based on its row and column indices in the TreeGrid.
2458
2504
  *
2459
- * @param {number} rowIndex - Specifies the row index.
2460
- * @param {number} columnIndex - Specifies the column index.
2461
- * @returns {Element} - Returns cell element in grid content
2505
+ * This method is helpful for accessing cell-level elements for custom
2506
+ * operations or styling.
2507
+ *
2508
+ * @param {number} rowIndex - The index of the row containing the cell.
2509
+ * @param {number} columnIndex - The index of the column containing the cell.
2510
+ * @returns {Element} - Returns the HTML element of the specified cell.
2462
2511
  */
2463
2512
  TreeGrid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {
2464
2513
  return this.grid.getCellFromIndex(rowIndex, columnIndex);
2465
2514
  };
2466
2515
  /**
2467
- * Gets a Column by column name.
2516
+ * Retrieves a column object by the column's field name.
2468
2517
  *
2469
- * @param {string} field - Specifies the column name.
2470
- * @returns {Column} - Returns tree grid column
2518
+ * This is typically used for obtaining the details of a column for
2519
+ * configuration or data manipulation purposes.
2520
+ *
2521
+ * @param {string} field - The field name of the column.
2522
+ * @returns {Column} - Returns the column object corresponding to the field.
2471
2523
  */
2472
2524
  TreeGrid.prototype.getColumnByField = function (field) {
2473
2525
  return iterateArrayOrObject(this.columnModel, function (item) {
@@ -2478,10 +2530,13 @@ var TreeGrid = /** @class */ (function (_super) {
2478
2530
  })[0];
2479
2531
  };
2480
2532
  /**
2481
- * Gets a column by UID.
2533
+ * Fetches a column object using the column's unique identifier (UID).
2534
+ *
2535
+ * Useful in scenarios where columns do not have unique field names but
2536
+ * are uniquely identifiable via UID.
2482
2537
  *
2483
- * @param {string} uid - Specifies the column UID.
2484
- * @returns {Column} - Returns tree grid column
2538
+ * @param {string} uid - The unique identifier for the column.
2539
+ * @returns {Column} - Returns the column object for the given UID.
2485
2540
  */
2486
2541
  TreeGrid.prototype.getColumnByUid = function (uid) {
2487
2542
  var Columns = this.initialRender ? this.grid.columns : this.columns;
@@ -2497,34 +2552,45 @@ var TreeGrid = /** @class */ (function (_super) {
2497
2552
  })[0];
2498
2553
  };
2499
2554
  /**
2500
- * Gets the collection of column fields.
2555
+ * Retrieves the names of all column fields in the TreeGrid.
2556
+ *
2557
+ * This method provides a list of field names useful for dynamic operations
2558
+ * or configuration where fields need to be enumerated or manipulated.
2501
2559
  *
2502
- * @returns {string[]} - Returns column field name as collection
2560
+ * @returns {string[]} - Returns an array of column field names.
2503
2561
  */
2504
2562
  TreeGrid.prototype.getColumnFieldNames = function () {
2505
2563
  return this.grid.getColumnFieldNames();
2506
2564
  };
2507
2565
  /**
2508
- * Gets the footer div of the TreeGrid.
2566
+ * Retrieves the footer content element of the TreeGrid, usually for styling or custom manipulation.
2509
2567
  *
2510
- * @returns {Element} - Returns footer content div element
2568
+ * This can be used to access the footer for adding custom functionality
2569
+ * or styling purposes to enhance user interaction at the bottom of the grid.
2570
+ *
2571
+ * @returns {Element} - Returns the footer content HTML element.
2511
2572
  */
2512
2573
  TreeGrid.prototype.getFooterContent = function () {
2513
2574
  return this.grid.getFooterContent();
2514
2575
  };
2515
2576
  /**
2516
- * Gets the footer table element of the TreeGrid.
2577
+ * Acquires the footer table element of the TreeGrid for layout management.
2578
+ *
2579
+ * Useful for manipulating the table's structure or style beneath the grid content.
2517
2580
  *
2518
- * @returns {Element} - Returns footer content table element
2581
+ * @returns {Element} - Returns the footer table HTML element.
2519
2582
  */
2520
2583
  TreeGrid.prototype.getFooterContentTable = function () {
2521
2584
  return this.grid.getFooterContentTable();
2522
2585
  };
2523
2586
  /**
2524
- * Shows a column by its column name.
2587
+ * Shows one or more columns based on the specified column names.
2525
2588
  *
2526
- * @param {string|string[]} keys - Defines a single or collection of column names.
2527
- * @param {string} showBy - Defines the column key either as field name or header text.
2589
+ * This is useful for dynamically adjusting the visibility of columns
2590
+ * based on user actions or application logic.
2591
+ *
2592
+ * @param {string|string[]} keys - A single column name or an array of column names to show.
2593
+ * @param {string} showBy - Key to determine visibility either as field name or header text.
2528
2594
  * @returns {void}
2529
2595
  */
2530
2596
  TreeGrid.prototype.showColumns = function (keys, showBy) {
@@ -2532,10 +2598,13 @@ var TreeGrid = /** @class */ (function (_super) {
2532
2598
  this.updateColumnModel();
2533
2599
  };
2534
2600
  /**
2535
- * Hides a column by column name.
2601
+ * Hides one or more columns based on the specified column names.
2602
+ *
2603
+ * Utilized to dynamically reduce the visibility of columns based on
2604
+ * user roles or preferences.
2536
2605
  *
2537
- * @param {string|string[]} keys - Defines a single or collection of column names.
2538
- * @param {string} hideBy - Defines the column key either as field name or header text.
2606
+ * @param {string|string[]} keys - A single column name or an array of column names to hide.
2607
+ * @param {string} hideBy - Key to evaluate columns either as field name or header text.
2539
2608
  * @returns {void}
2540
2609
  */
2541
2610
  TreeGrid.prototype.hideColumns = function (keys, hideBy) {
@@ -2543,37 +2612,48 @@ var TreeGrid = /** @class */ (function (_super) {
2543
2612
  this.updateColumnModel();
2544
2613
  };
2545
2614
  /**
2546
- * Gets a column header by column name.
2615
+ * Retrieves a column header element based on the field name of the column.
2616
+ *
2617
+ * This method helps to directly manipulate headers, such as applying custom styles.
2547
2618
  *
2548
- * @param {string} field - Specifies the column name.
2549
- * @returns {Element} - Returns column header element
2619
+ * @param {string} field - The field name of the desired column.
2620
+ * @returns {Element} - Returns the HTML element of the column header.
2550
2621
  */
2551
2622
  TreeGrid.prototype.getColumnHeaderByField = function (field) {
2552
2623
  return this.grid.getColumnHeaderByField(field);
2553
2624
  };
2554
2625
  /**
2555
- * Gets a column header by column index.
2626
+ * Acquires the column header element using the column's index.
2556
2627
  *
2557
- * @param {number} index - Specifies the column index.
2558
- * @returns {Element} - Returns column header element
2628
+ * Suitable for situations where direct column index is available
2629
+ * and header access is needed for operations.
2630
+ *
2631
+ * @param {number} index - The index of the column.
2632
+ * @returns {Element} - Returns the HTML element of the specified column header.
2559
2633
  */
2560
2634
  TreeGrid.prototype.getColumnHeaderByIndex = function (index) {
2561
2635
  return this.grid.getColumnHeaderByIndex(index);
2562
2636
  };
2563
2637
  /**
2564
- * Gets a column header by UID.
2638
+ * Retrieves a column header element utilizing the column's UID.
2565
2639
  *
2566
- * @param {string} uid - Specifies the column uid.
2567
- * @returns {Element} - Returns column header element
2640
+ * Useful for precision access to header elements when UIDs are used
2641
+ * uniquely to manage column identities.
2642
+ *
2643
+ * @param {string} uid - The UID of the column.
2644
+ * @returns {Element} - Returns the HTML element of the column header.
2568
2645
  */
2569
2646
  TreeGrid.prototype.getColumnHeaderByUid = function (uid) {
2570
2647
  return this.grid.getColumnHeaderByUid(uid);
2571
2648
  };
2572
2649
  /**
2573
- * Gets a column index by column name.
2650
+ * Determines the column index by the specified field name.
2651
+ *
2652
+ * Helpful in converting field names to indices for operations that require
2653
+ * numeric input for array or collection indexing.
2574
2654
  *
2575
- * @param {string} field - Specifies the column name.
2576
- * @returns {number} - Returns column index
2655
+ * @param {string} field - The field name of the column.
2656
+ * @returns {number} - Returns the index of the column.
2577
2657
  */
2578
2658
  TreeGrid.prototype.getColumnIndexByField = function (field) {
2579
2659
  return this.grid.getColumnIndexByField(field);
@@ -2589,19 +2669,25 @@ var TreeGrid = /** @class */ (function (_super) {
2589
2669
  return !isNullOrUndefined(index) ? index : -1;
2590
2670
  };
2591
2671
  /**
2592
- * Gets a column index by UID.
2672
+ * Determines the column index based on the unique identifier (UID).
2673
+ *
2674
+ * This can be crucial in scenarios that involve dynamic column management
2675
+ * where UID provides an accurate reference.
2593
2676
  *
2594
- * @param {string} uid - Specifies the column UID.
2595
- * @returns {number} - Returns column index
2677
+ * @param {string} uid - The UID of the column.
2678
+ * @returns {number} - Returns the column index.
2596
2679
  */
2597
2680
  TreeGrid.prototype.getColumnIndexByUid = function (uid) {
2598
2681
  return this.grid.getColumnIndexByUid(uid);
2599
2682
  };
2600
2683
  /**
2601
- * Gets the columns from the TreeGrid.
2684
+ * Fetches a collection of columns from the TreeGrid optionally refreshing the column model.
2602
2685
  *
2603
- * @param {boolean} isRefresh - Defined whether to update DOM
2604
- * @returns {Column[]} - Returns treegrid columns collection
2686
+ * Use this method to retrieve and optionally refresh the list of columns
2687
+ * to ensure up-to-date configurations and settings.
2688
+ *
2689
+ * @param {boolean} isRefresh - Determines whether to refresh the grid's column model.
2690
+ * @returns {Column[]} - Returns an array of TreeGrid column objects.
2605
2691
  */
2606
2692
  TreeGrid.prototype.getColumns = function (isRefresh) {
2607
2693
  this.updateColumnModel(this.grid.getColumns(isRefresh));
@@ -2664,9 +2750,12 @@ var TreeGrid = /** @class */ (function (_super) {
2664
2750
  });
2665
2751
  };
2666
2752
  /**
2667
- * Gets the content div of the TreeGrid.
2753
+ * Retrieves the main content area of the TreeGrid.
2754
+ *
2755
+ * This method allows access to the main content DIV, which can
2756
+ * be used for layout adjustments or adding custom elements.
2668
2757
  *
2669
- * @returns {Element} - Return tree grid content element
2758
+ * @returns {Element} - Returns the TreeGrid content HTML element.
2670
2759
  */
2671
2760
  TreeGrid.prototype.getContent = function () {
2672
2761
  return this.grid.getContent();
@@ -2677,7 +2766,9 @@ var TreeGrid = /** @class */ (function (_super) {
2677
2766
  };
2678
2767
  TreeGrid.prototype.mergeColumns = function (storedColumn, columns) {
2679
2768
  var persist2 = 'mergeColumns';
2769
+ var mergedColumns = 'mergedColumns';
2680
2770
  this.grid["" + persist2].apply(this, [storedColumn, columns]);
2771
+ this.grid["" + mergedColumns] = true;
2681
2772
  };
2682
2773
  TreeGrid.prototype.setFrozenCount = function () {
2683
2774
  var persist3 = 'setFrozenCount';
@@ -2688,7 +2779,7 @@ var TreeGrid = /** @class */ (function (_super) {
2688
2779
  this.grid["" + persist4].apply(this.grid, [columns]);
2689
2780
  };
2690
2781
  TreeGrid.prototype.isFrozenGrid = function () {
2691
- return this.grid.isFrozenGrid();
2782
+ return this.grid.isFrozenGrid.apply(this);
2692
2783
  };
2693
2784
  TreeGrid.prototype.updateTreeGridModel = function () {
2694
2785
  this.setProperties({ filterSettings: getObject('properties', this.grid.filterSettings) }, true);
@@ -2697,17 +2788,23 @@ var TreeGrid = /** @class */ (function (_super) {
2697
2788
  this.setProperties({ sortSettings: getObject('properties', this.grid.sortSettings) }, true);
2698
2789
  };
2699
2790
  /**
2700
- * Gets the content table of the TreeGrid.
2791
+ * Retrieves the content table element of the TreeGrid.
2701
2792
  *
2702
- * @returns {Element} - Returns content table element
2793
+ * This table contains the main data display area, allowing for
2794
+ * interaction and data manipulation directly within the TreeGrid.
2795
+ *
2796
+ * @returns {Element} - Returns the HTML element representing the content table.
2703
2797
  */
2704
2798
  TreeGrid.prototype.getContentTable = function () {
2705
2799
  return this.grid.getContentTable();
2706
2800
  };
2707
2801
  /**
2708
- * Gets all the TreeGrid's data rows.
2802
+ * Obtains all data row elements from the TreeGrid, excluding summary rows.
2803
+ *
2804
+ * Provides a way to access the visual representation of data for purposes
2805
+ * like custom formatting or event binding.
2709
2806
  *
2710
- * @returns {Element[]} - Returns row elements
2807
+ * @returns {Element[]} - Returns an array of data row elements.
2711
2808
  */
2712
2809
  TreeGrid.prototype.getDataRows = function () {
2713
2810
  var dRows = [];
@@ -2720,9 +2817,12 @@ var TreeGrid = /** @class */ (function (_super) {
2720
2817
  return dRows;
2721
2818
  };
2722
2819
  /**
2723
- * Get current visible data of TreeGrid.
2820
+ * Retrieves the current set of records that are visible in the TreeGrid view.
2821
+ *
2822
+ * This method excludes any summary rows to focus on the main data set
2823
+ * currently being viewed by the user.
2724
2824
  *
2725
- * @returns {Object[]} - Returns current view records
2825
+ * @returns {Object[]} - Returns an array of the current view records.
2726
2826
  * @isGenericType true
2727
2827
  */
2728
2828
  TreeGrid.prototype.getCurrentViewRecords = function () {
@@ -2730,60 +2830,78 @@ var TreeGrid = /** @class */ (function (_super) {
2730
2830
  return this.grid.currentViewData.filter(function (e) { return isNullOrUndefined(e["" + isSummaryRow]); });
2731
2831
  };
2732
2832
  /**
2733
- * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.
2833
+ * Collects data changes (added, edited, and deleted) that have not been saved in batch mode.
2734
2834
  *
2735
- * @returns {Object} - Returns batch changes
2835
+ * This allows you to view pending changes awaiting a commit to the data source.
2836
+ *
2837
+ * @returns {Object} - Returns an object detailing batch changes.
2736
2838
  */
2737
2839
  TreeGrid.prototype.getBatchChanges = function () {
2738
2840
  return this.grid.editModule.getBatchChanges();
2739
2841
  };
2740
2842
  /**
2741
- * Gets the header div of the TreeGrid.
2843
+ * Retrieves the header content element of the TreeGrid.
2844
+ *
2845
+ * Mainly used for interacting with the header section, which includes
2846
+ * column headers and any applied header styling or events.
2742
2847
  *
2743
- * @returns {Element} - Returns Header content element
2848
+ * @returns {Element} - Returns the HTML element for header content.
2744
2849
  */
2745
2850
  TreeGrid.prototype.getHeaderContent = function () {
2746
2851
  return this.grid.getHeaderContent();
2747
2852
  };
2748
2853
  /**
2749
- * Gets the header table element of the TreeGrid.
2854
+ * Retrieves the header table element of the TreeGrid.
2750
2855
  *
2751
- * @returns {Element} - Return header table element
2856
+ * This method is useful for direct access to the table structure
2857
+ * where column headers are defined.
2858
+ *
2859
+ * @returns {Element} - Returns the HTML element for the header table.
2752
2860
  */
2753
2861
  TreeGrid.prototype.getHeaderTable = function () {
2754
2862
  return this.grid.getHeaderTable();
2755
2863
  };
2756
2864
  /**
2757
- * Gets a row by index.
2865
+ * Fetches a specific row element based on its index in the TreeGrid.
2758
2866
  *
2759
- * @param {number} index - Specifies the row index.
2760
- * @returns {Element} - Returns row element
2867
+ * This provides a way to directly access and manipulate a row using its index.
2868
+ *
2869
+ * @param {number} index - The index of the desired row.
2870
+ * @returns {Element} - Returns the HTML element of the specified row.
2761
2871
  */
2762
2872
  TreeGrid.prototype.getRowByIndex = function (index) {
2763
2873
  return this.grid.getRowByIndex(index);
2764
2874
  };
2765
2875
  /**
2766
- * Get a row information based on cell
2876
+ * Provides detailed information about a row based on a specified target element.
2767
2877
  *
2768
- * @param {Element | EventTarget} target - Target row element
2769
- * @returns {RowInfo} - Returns row information in a JSON object
2878
+ * Integral for retrieving metadata such as row index or data object
2879
+ * when working with events or complex tree structures.
2880
+ *
2881
+ * @param {Element | EventTarget} target - The target element or event triggering the request.
2882
+ * @returns {RowInfo} - Returns an object containing row information.
2770
2883
  */
2771
2884
  TreeGrid.prototype.getRowInfo = function (target) {
2772
2885
  return this.grid.getRowInfo(target);
2773
2886
  };
2774
2887
  /**
2775
- * Gets UID by column name.
2888
+ * Finds the unique identifier (UID) for a column based on its field name.
2889
+ *
2890
+ * UIDs are essential for precise identification and manipulation within complex grids.
2776
2891
  *
2777
- * @param {string} field - Specifies the column name.
2778
- * @returns {string} - Returns unique id based on column field name given
2892
+ * @param {string} field - The field name of the column.
2893
+ * @returns {string} - Returns the unique identifier for the specified column.
2779
2894
  */
2780
2895
  TreeGrid.prototype.getUidByColumnField = function (field) {
2781
2896
  return this.grid.getUidByColumnField(field);
2782
2897
  };
2783
2898
  /**
2784
- * Gets the visible columns from the TreeGrid.
2899
+ * Retrieves all the columns that are currently set to be visible within the TreeGrid.
2785
2900
  *
2786
- * @returns {Column[]} - Returns visible columns collection
2901
+ * Helps in understanding the user's current view and can be used to dynamically
2902
+ * adjust the visible columns.
2903
+ *
2904
+ * @returns {Column[]} - Returns an array of visible column objects.
2787
2905
  */
2788
2906
  TreeGrid.prototype.getVisibleColumns = function () {
2789
2907
  var cols = [];
@@ -2796,7 +2914,9 @@ var TreeGrid = /** @class */ (function (_super) {
2796
2914
  return cols;
2797
2915
  };
2798
2916
  /**
2799
- * By default, TreeGrid shows the spinner for all its actions. You can use this method to show spinner at your needed time.
2917
+ * Displays a loading spinner overlay across the TreeGrid for any data action or long-running process.
2918
+ *
2919
+ * This can be manually invoked to indicate processing, enhancing user experience by providing feedback.
2800
2920
  *
2801
2921
  * @returns {void}
2802
2922
  */
@@ -2804,7 +2924,10 @@ var TreeGrid = /** @class */ (function (_super) {
2804
2924
  showSpinner(this.element);
2805
2925
  };
2806
2926
  /**
2807
- * Manually shown spinner needs to hide by `hideSpinnner`.
2927
+ * Hides a manually shown loading spinner overlay from the TreeGrid.
2928
+ *
2929
+ * Ensures that any long-running process indication is removed after completion
2930
+ * to manage user interface aesthetics.
2808
2931
  *
2809
2932
  * @returns {void}
2810
2933
  */
@@ -2812,7 +2935,10 @@ var TreeGrid = /** @class */ (function (_super) {
2812
2935
  hideSpinner(this.element);
2813
2936
  };
2814
2937
  /**
2815
- * Refreshes the TreeGrid header and content.
2938
+ * Refreshes the visual appearance and data of the TreeGrid, updating header and content.
2939
+ *
2940
+ * This is crucial for synchronizing the displayed data with the underlying data source,
2941
+ * ensuring the view reflects current data.
2816
2942
  *
2817
2943
  * @returns {void}
2818
2944
  */
@@ -2832,18 +2958,24 @@ var TreeGrid = /** @class */ (function (_super) {
2832
2958
  this.grid.refresh();
2833
2959
  };
2834
2960
  /**
2835
- * Get the records of checked rows.
2961
+ * Retrieves the records associated with rows that have their checkboxes checked.
2962
+ *
2963
+ * Facilitates operations that require information about specifically selected or
2964
+ * interacted rows within the grid.
2836
2965
  *
2837
- * @returns {Object[]} - Returns records that has been checked
2966
+ * @returns {Object[]} - Returns an array of checked row data objects.
2838
2967
  * @isGenericType true
2839
2968
  */
2840
2969
  TreeGrid.prototype.getCheckedRecords = function () {
2841
2970
  return this.selectionModule.getCheckedrecords();
2842
2971
  };
2843
2972
  /**
2844
- * Get the visible records corresponding to rows visually displayed.
2973
+ * Retrieves currently visible records according to the TreeGrid's visual state.
2845
2974
  *
2846
- * @returns {Object[]} - Returns visible records based on collapse state of rows
2975
+ * It considers row expansion and collapse states to return only those records
2976
+ * that a user can currently interact with.
2977
+ *
2978
+ * @returns {Object[]} - Returns visible records reflecting the TreeGrid's current view.
2847
2979
  * @isGenericType true
2848
2980
  */
2849
2981
  TreeGrid.prototype.getVisibleRecords = function () {
@@ -2863,26 +2995,35 @@ var TreeGrid = /** @class */ (function (_super) {
2863
2995
  return visibleRecords;
2864
2996
  };
2865
2997
  /**
2866
- * Get the indexes of checked rows.
2998
+ * Retrieves the indices of rows that have their checkboxes checked.
2999
+ *
3000
+ * This can assist in programatically assessing which rows have been selected
3001
+ * by checkbox interaction for further processing.
2867
3002
  *
2868
- * @returns {number[]} - Returns checked row indexes
3003
+ * @returns {number[]} - Returns an array of indices corresponding to checked rows.
2869
3004
  */
2870
3005
  TreeGrid.prototype.getCheckedRowIndexes = function () {
2871
3006
  return this.selectionModule.getCheckedRowIndexes();
2872
3007
  };
2873
3008
  /**
2874
- * Checked the checkboxes using rowIndexes.
3009
+ * Selects rows in the TreeGrid using row indices, checking their associated checkboxes.
3010
+ *
3011
+ * This method provides automation for selecting or highlighting specific rows,
3012
+ * useful in scenarios needing pre-selection or default selections.
2875
3013
  *
2876
- * @param {number[]} indexes - row indexes
3014
+ * @param {number[]} indexes - An array of row indices to be marked as selected.
2877
3015
  * @returns {void}
2878
3016
  */
2879
3017
  TreeGrid.prototype.selectCheckboxes = function (indexes) {
2880
3018
  this.selectionModule.selectCheckboxes(indexes);
2881
3019
  };
2882
3020
  /**
2883
- * Refreshes the TreeGrid column changes.
3021
+ * Updates and refreshes the TreeGrid's column definitions and layout.
2884
3022
  *
2885
- * @param {boolean} refreshUI - Defined whether to refresh the DOM
3023
+ * Ensures that the latest column settings are displayed, either refreshing the UI
3024
+ * or adjusting internal configurations to match current data or configuration updates.
3025
+ *
3026
+ * @param {boolean} refreshUI - A flag indicating whether the DOM should be updated.
2886
3027
  * @returns {void}
2887
3028
  */
2888
3029
  TreeGrid.prototype.refreshColumns = function (refreshUI) {
@@ -2911,7 +3052,10 @@ var TreeGrid = /** @class */ (function (_super) {
2911
3052
  this.setProperties({ treeColumnIndex: treeIndex }, true);
2912
3053
  };
2913
3054
  /**
2914
- * Refreshes the TreeGrid header.
3055
+ * Refreshes the header section of the TreeGrid to reflect any structural or data changes.
3056
+ *
3057
+ * This method is useful when there are dynamic updates or layout adjustments
3058
+ * needed in the header portion to ensure it aligns with current grid data or settings.
2915
3059
  *
2916
3060
  * @returns {void}
2917
3061
  */
@@ -2966,12 +3110,15 @@ var TreeGrid = /** @class */ (function (_super) {
2966
3110
  }
2967
3111
  };
2968
3112
  /**
2969
- * Expands child rows
3113
+ * Expands the specified parent row within the TreeGrid to reveal its nested data.
2970
3114
  *
2971
- * @param {HTMLTableRowElement} row - Expands the given row
2972
- * @param {Object} record - Expands the given record
2973
- * @param {Object} key - Primary key value
2974
- * @param {number} level - Specifies the hierarchical level of the record
3115
+ * This method is useful for programmatically expanding rows to display their
3116
+ * hierarchical children, providing detailed views for nested data structures.
3117
+ *
3118
+ * @param {HTMLTableRowElement} row - The table row element that should be expanded.
3119
+ * @param {Object} record - Optional. Represents the data record associated with the row to be expanded.
3120
+ * @param {Object} key - Optional. The primary key value that uniquely identifies the record.
3121
+ * @param {number} level - Optional. Indicates the hierarchical level of the record within the TreeGrid.
2975
3122
  * @returns {void}
2976
3123
  */
2977
3124
  TreeGrid.prototype.expandRow = function (row, record, key, level) {
@@ -2987,7 +3134,7 @@ var TreeGrid = /** @class */ (function (_super) {
2987
3134
  if (isNullOrUndefined(row) && isNullOrUndefined(record)) {
2988
3135
  return;
2989
3136
  }
2990
- if (!isNullOrUndefined(row) && row.cells[0].classList.contains('e-lastrowcell')) {
3137
+ if (!isNullOrUndefined(row) && row.cells && row.cells[0].classList.contains('e-lastrowcell')) {
2991
3138
  this.lastRowBorder(row, false);
2992
3139
  }
2993
3140
  if (this.isExpandAll && !isRemoteData(this)) {
@@ -3027,7 +3174,6 @@ var TreeGrid = /** @class */ (function (_super) {
3027
3174
  };
3028
3175
  // Internal method to handle the rows expand
3029
3176
  TreeGrid.prototype.expandRows = function (row, record, parentRec) {
3030
- var initialTotalRecordsCount = this.grid.totalDataRecordsCount;
3031
3177
  this.expandCollapse('expand', row, record);
3032
3178
  var children = 'Children';
3033
3179
  if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
@@ -3071,12 +3217,12 @@ var TreeGrid = /** @class */ (function (_super) {
3071
3217
  }
3072
3218
  else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
3073
3219
  if (this.detailTemplate) {
3074
- record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
3220
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
3075
3221
  }
3076
3222
  else {
3077
3223
  if (this.enableVirtualization && (this.isCollapseAll || this.isExpandAll)) {
3078
3224
  if (row.rowIndex === -1) {
3079
- record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
3225
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
3080
3226
  }
3081
3227
  else {
3082
3228
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
@@ -3086,18 +3232,27 @@ var TreeGrid = /** @class */ (function (_super) {
3086
3232
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
3087
3233
  }
3088
3234
  else {
3089
- record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
3235
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
3090
3236
  }
3091
3237
  }
3092
3238
  }
3093
3239
  return record;
3094
3240
  };
3095
3241
  /**
3096
- * Collapses child rows
3242
+ * Collapses the specified parent row in the TreeGrid.
3243
+ *
3244
+ * This method collapses the row associated with the provided HTMLTableRowElement,
3245
+ * hiding any of its displayed child rows. It is typically used to manage the
3246
+ * visibility of hierarchical data within a tree structure.
3097
3247
  *
3098
- * @param {HTMLTableRowElement} row - Collapse the given row
3099
- * @param {Object} record - Collapse the given record
3100
- * @param {Object} key - Primary key value
3248
+ * @param {HTMLTableRowElement} row - The HTMLTableRowElement representing the parent row
3249
+ * whose child rows are to be collapsed.
3250
+ * @param {Object} record - (Optional) The data record associated with the row being collapsed.
3251
+ * This can be used to access or manipulate the underlying data
3252
+ * when collapsing the row.
3253
+ * @param {Object} key - (Optional) The primary key value of the record. It can be used to identify
3254
+ * the target record uniquely when collapsing the row, especially in cases
3255
+ * where the row or record data needs to be referenced or logged.
3101
3256
  * @returns {void}
3102
3257
  */
3103
3258
  TreeGrid.prototype.collapseRow = function (row, record, key) {
@@ -3179,9 +3334,12 @@ var TreeGrid = /** @class */ (function (_super) {
3179
3334
  }
3180
3335
  };
3181
3336
  /**
3182
- * Expands the records at specific hierarchical level
3337
+ * Expands all the records at the specified hierarchical level within the TreeGrid.
3338
+ *
3339
+ * This method is useful for visually expanding data at a certain depth, making
3340
+ * all parent rows visible at the given level and their child rows accessible.
3183
3341
  *
3184
- * @param {number} level - Expands the parent rows at given level
3342
+ * @param {number} level - The hierarchical level at which parent rows should be expanded.
3185
3343
  * @returns {void}
3186
3344
  */
3187
3345
  TreeGrid.prototype.expandAtLevel = function (level) {
@@ -3201,9 +3359,12 @@ var TreeGrid = /** @class */ (function (_super) {
3201
3359
  }
3202
3360
  };
3203
3361
  /**
3204
- * Expands the records by given primary key value
3362
+ * Expands a specific record identified by the provided primary key value.
3205
3363
  *
3206
- * @param {Object} key - Expands the parent rows with given primary key value
3364
+ * This method is useful for expanding particular node in the TreeGrid when
3365
+ * the parent rows need to be targeted individually by their unique key.
3366
+ *
3367
+ * @param {Object} key - The primary key value of the record to be expanded.
3207
3368
  * @returns {void}
3208
3369
  */
3209
3370
  TreeGrid.prototype.expandByKey = function (key) {
@@ -3258,9 +3419,12 @@ var TreeGrid = /** @class */ (function (_super) {
3258
3419
  return obj;
3259
3420
  };
3260
3421
  /**
3261
- * Collapses the records at specific hierarchical level
3422
+ * Collapses all the records at the specified hierarchical level within the TreeGrid.
3423
+ *
3424
+ * This function helps in hiding child rows for all parent nodes at a given level,
3425
+ * effectively reducing the visible depth of the hierarchical structure.
3262
3426
  *
3263
- * @param {number} level - Define the parent row level which needs to be collapsed
3427
+ * @param {number} level - The hierarchical level at which parent rows should be collapsed.
3264
3428
  * @returns {void}
3265
3429
  */
3266
3430
  TreeGrid.prototype.collapseAtLevel = function (level) {
@@ -3280,9 +3444,12 @@ var TreeGrid = /** @class */ (function (_super) {
3280
3444
  }
3281
3445
  };
3282
3446
  /**
3283
- * Collapses the records by given primary key value
3447
+ * Collapses a specific record identified by the provided primary key value.
3284
3448
  *
3285
- * @param {Object} key - Collapses the parent rows with given primary key value
3449
+ * This method is useful for collapsing particular node in the TreeGrid when
3450
+ * the parent rows need to be targeted individually by their unique key.
3451
+ *
3452
+ * @param {Object} key - The primary key value of the record to be collapsed.
3286
3453
  * @returns {void}
3287
3454
  */
3288
3455
  TreeGrid.prototype.collapseByKey = function (key) {
@@ -3321,7 +3488,10 @@ var TreeGrid = /** @class */ (function (_super) {
3321
3488
  }
3322
3489
  };
3323
3490
  /**
3324
- * Expands All the rows
3491
+ * Expands all rows in the TreeGrid, making the full hierarchy visible.
3492
+ *
3493
+ * This method should be used with caution on large datasets, as it makes
3494
+ * all nodes and their child rows visible, which might affect performance.
3325
3495
  *
3326
3496
  * @returns {void}
3327
3497
  */
@@ -3332,10 +3502,23 @@ var TreeGrid = /** @class */ (function (_super) {
3332
3502
  }
3333
3503
  this.isExpandedEventTriggered = false;
3334
3504
  this.isExpandingEventTriggered = false;
3505
+ if (this.editSettings.mode === 'Batch') {
3506
+ var obj = 'dialogObj';
3507
+ var showDialog = 'showDialog';
3508
+ if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
3509
+ this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
3510
+ var dialogObj = this.grid.editModule["" + obj];
3511
+ this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
3512
+ return;
3513
+ }
3514
+ }
3335
3515
  this.expandCollapseAll('expand');
3336
3516
  };
3337
3517
  /**
3338
- * Collapses All the rows
3518
+ * Collapses all rows in the TreeGrid, hiding all child rows and leaving only parent nodes visible.
3519
+ *
3520
+ * This method can be used to quickly minimize the view to only top-level data,
3521
+ * which is helpful for summarizing or performing broad overviews of the dataset.
3339
3522
  *
3340
3523
  * @returns {void}
3341
3524
  */
@@ -3346,6 +3529,16 @@ var TreeGrid = /** @class */ (function (_super) {
3346
3529
  }
3347
3530
  this.isCollapsedEventTriggered = false;
3348
3531
  this.isCollapsingEventTriggered = false;
3532
+ if (this.editSettings.mode === 'Batch') {
3533
+ var obj = 'dialogObj';
3534
+ var showDialog = 'showDialog';
3535
+ if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
3536
+ this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
3537
+ var dialogObj = this.grid.editModule["" + obj];
3538
+ this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
3539
+ return;
3540
+ }
3541
+ }
3349
3542
  this.expandCollapseAll('collapse');
3350
3543
  };
3351
3544
  TreeGrid.prototype.expandCollapseAll = function (action) {
@@ -3365,7 +3558,7 @@ var TreeGrid = /** @class */ (function (_super) {
3365
3558
  }
3366
3559
  this.isExpandAll = true;
3367
3560
  this.isCollapseAll = true;
3368
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
3561
+ if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
3369
3562
  this.flatData.filter(function (e) {
3370
3563
  if (e.hasChildRecords) {
3371
3564
  e.expanded = action === 'collapse' ? false : true;
@@ -3429,12 +3622,12 @@ var TreeGrid = /** @class */ (function (_super) {
3429
3622
  row = gridRows[parseInt(rowIndex.toString(), 10)];
3430
3623
  }
3431
3624
  else {
3432
- rowIndex = +row.getAttribute('data-rowindex');
3625
+ rowIndex = +row.getAttribute('aria-rowindex') - 1;
3433
3626
  }
3434
3627
  if (!isNullOrUndefined(row)) {
3435
3628
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
3436
3629
  }
3437
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
3630
+ if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization) && !isRemoteData(this)
3438
3631
  && !isCountRequired(this)) {
3439
3632
  this.notify(events.localPagedExpandCollapse, { action: action, row: row, record: record });
3440
3633
  }
@@ -3444,6 +3637,9 @@ var TreeGrid = /** @class */ (function (_super) {
3444
3637
  displayAction = 'e-childrow-visible';
3445
3638
  if (!isChild) {
3446
3639
  record.expanded = true;
3640
+ this.flatData.forEach(function (e) {
3641
+ e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
3642
+ });
3447
3643
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3448
3644
  }
3449
3645
  if (!isNullOrUndefined(row)) {
@@ -3465,6 +3661,9 @@ var TreeGrid = /** @class */ (function (_super) {
3465
3661
  displayAction = 'e-childrow-hidden';
3466
3662
  if (!isChild || isCountRequired(this)) {
3467
3663
  record.expanded = false;
3664
+ this.flatData.forEach(function (e) {
3665
+ e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
3666
+ });
3468
3667
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3469
3668
  }
3470
3669
  if (!isNullOrUndefined(row)) {
@@ -3707,7 +3906,9 @@ var TreeGrid = /** @class */ (function (_super) {
3707
3906
  }
3708
3907
  if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
3709
3908
  || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
3710
- gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
3909
+ if (!isNullOrUndefined(gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex])) {
3910
+ gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
3911
+ }
3711
3912
  var parentRecord = currentViewData.filter(function (e) {
3712
3913
  return e.uniqueID === currentRecord[0].parentUniqueID;
3713
3914
  });
@@ -3853,28 +4054,6 @@ var TreeGrid = /** @class */ (function (_super) {
3853
4054
  }
3854
4055
  return value;
3855
4056
  };
3856
- /**
3857
- * Updates the rows and cells
3858
- *
3859
- * @param {Object[]} records - Updates the given records
3860
- * @param {HTMLTableRowElement[]} rows - Updates the given rows
3861
- * @param {number} index - Updates the given cell index
3862
- * @returns {void}
3863
- */
3864
- TreeGrid.prototype.updateRowAndCellElements = function (records, rows, index) {
3865
- for (var i = 0; i < records.length; i++) {
3866
- this.renderModule.cellRender({
3867
- data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
3868
- column: this.grid.getColumns()[this.treeColumnIndex],
3869
- requestType: 'rowDragAndDrop'
3870
- });
3871
- if (this['action'] === 'indenting' || this['action'] === 'outdenting') {
3872
- this.renderModule.RowModifier({
3873
- data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
3874
- });
3875
- }
3876
- }
3877
- };
3878
4057
  /**
3879
4058
  * @hidden
3880
4059
  * @returns {void}
@@ -3882,6 +4061,7 @@ var TreeGrid = /** @class */ (function (_super) {
3882
4061
  TreeGrid.prototype.addListener = function () {
3883
4062
  this.on('updateResults', this.updateResultModel, this);
3884
4063
  this.grid.on('initial-end', this.afterGridRender, this);
4064
+ this.grid.on('last-rowcell-border-updated', this.lastRowCellBorderUpdated, this);
3885
4065
  };
3886
4066
  TreeGrid.prototype.updateResultModel = function (returnResult) {
3887
4067
  this.dataResults = returnResult;
@@ -3896,27 +4076,31 @@ var TreeGrid = /** @class */ (function (_super) {
3896
4076
  }
3897
4077
  this.off('updateResults', this.updateResultModel);
3898
4078
  this.grid.off('initial-end', this.afterGridRender);
4079
+ this.grid.off('last-rowcell-border-updated', this.lastRowCellBorderUpdated);
3899
4080
  };
3900
4081
  /**
3901
- * Filters TreeGrid row by column name with the given options.
4082
+ * Filters the TreeGrid rows based on a specified column and filter criteria.
4083
+ *
4084
+ * This method allows for dynamic filtering against column data using various
4085
+ * operators and values, supporting case-sensitive filtering and accent sensitivity.
3902
4086
  *
3903
- * @param {string} fieldName - Defines the field name of the column.
3904
- * @param {string} filterOperator - Defines the operator to filter records.
3905
- * @param {string | number | Date | boolean} filterValue - Defines the value used to filter records.
3906
- * @param {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.
3907
- * @param {boolean} matchCase - If match case is set to true, the TreeGrid filters the records with exact match. if false, it filters
3908
- * case insensitive records (uppercase and lowercase letters are treated the same).
3909
- * @param {boolean} ignoreAccent - If ignoreAccent is set to true,
3910
- * then filter ignores diacritic characters or accents while filtering.
3911
- * @param {string} actualFilterValue - Defines the actual filter value for filter column.
3912
- * @param {string} actualOperator - Defines the actual filter operator for filter column.
4087
+ * @param {string} fieldName - The name of the column to apply the filter on.
4088
+ * @param {string} filterOperator - The operator used to perform the filter (e.g., 'equals', 'startswith').
4089
+ * @param {string | number | Date | boolean } filterValue - The value to filter against.
4090
+ * @param {string} predicate - The logical operator ('AND'/'OR') to combine this filter with others.
4091
+ * @param {boolean} matchCase - If true, the filter performs a case-sensitive match.
4092
+ * @param {boolean} ignoreAccent - If true, the filter ignores diacritical marks.
4093
+ * @param {string} actualFilterValue - The original value used for filtering, useful for distinguishing displayed and actual values.
4094
+ * @param {string} actualOperator - The actual operator that is applied when different from the displayed operator.
3913
4095
  * @returns {void}
3914
4096
  */
3915
4097
  TreeGrid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
3916
4098
  this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
3917
4099
  };
3918
4100
  /**
3919
- * Clears all the filtered rows of the TreeGrid.
4101
+ * Clears all filters applied to the TreeGrid, restoring the view to show all records.
4102
+ *
4103
+ * This method is useful for resetting the grid to its unfiltered state.
3920
4104
  *
3921
4105
  * @returns {void}
3922
4106
  */
@@ -3935,26 +4119,32 @@ var TreeGrid = /** @class */ (function (_super) {
3935
4119
  this.grid.removeFilteredColsByField(field, isClearFilterBar);
3936
4120
  };
3937
4121
  /**
3938
- * Selects a row by given index.
4122
+ * Selects a row in the TreeGrid by its index.
4123
+ *
4124
+ * Use this method to highlight a specific row; useful for programmatically navigating data.
3939
4125
  *
3940
- * @param {number} index - Defines the row index.
3941
- * @param {boolean} isToggle - If set to true, then it toggles the selection.
4126
+ * @param {number} index - Index of the row to select.
4127
+ * @param {boolean} isToggle - If true, toggles the selection state of the row.
3942
4128
  * @returns {void}
3943
4129
  */
3944
4130
  TreeGrid.prototype.selectRow = function (index, isToggle) {
3945
4131
  this.grid.selectRow(index, isToggle);
3946
4132
  };
3947
4133
  /**
3948
- * Selects a collection of rows by indexes.
4134
+ * Selects multiple rows in the TreeGrid given an array of row indexes.
3949
4135
  *
3950
- * @param {number[]} rowIndexes - Specifies the row indexes.
4136
+ * Useful for batch operations where multiple row selections are necessary.
4137
+ *
4138
+ * @param {number[]} rowIndexes - Array of row index numbers to select.
3951
4139
  * @returns {void}
3952
4140
  */
3953
4141
  TreeGrid.prototype.selectRows = function (rowIndexes) {
3954
4142
  this.grid.selectRows(rowIndexes);
3955
4143
  };
3956
4144
  /**
3957
- * Deselects the current selected rows and cells.
4145
+ * Deselects all selected rows and cells within the TreeGrid.
4146
+ *
4147
+ * Resets the selection state of the grid, which is useful after bulk operations.
3958
4148
  *
3959
4149
  * @returns {void}
3960
4150
  */
@@ -3965,39 +4155,47 @@ var TreeGrid = /** @class */ (function (_super) {
3965
4155
  this.grid.clearSelection();
3966
4156
  };
3967
4157
  /**
3968
- * Copy the selected rows or cells data into clipboard.
4158
+ * Copies the data of selected rows or cells to the clipboard.
3969
4159
  *
3970
- * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.
4160
+ * This method supports including headers for better context when pasting elsewhere.
4161
+ *
4162
+ * @param {boolean} withHeader - (Optional) If true, includes column headers in the copied data.
3971
4163
  * @returns {void}
3972
4164
  */
3973
4165
  TreeGrid.prototype.copy = function (withHeader) {
3974
4166
  this.clipboardModule.copy(withHeader);
3975
4167
  };
3976
4168
  /**
3977
- * Paste data from clipboard to selected cells.
4169
+ * Pastes data into the selected cells from the clipboard.
4170
+ *
4171
+ * Automatically places the pasted data starting from the specified indices.
3978
4172
  *
3979
- * @param {boolean} data - Specifies the date for paste.
3980
- * @param {boolean} rowIndex - Specifies the row index.
3981
- * @param {boolean} colIndex - Specifies the column index.
4173
+ * @param {string} data - The clipboard data to paste.
4174
+ * @param {number} rowIndex - The starting row index for pasting.
4175
+ * @param {number} colIndex - The starting column index for pasting.
3982
4176
  * @returns {void}
3983
4177
  */
3984
4178
  TreeGrid.prototype.paste = function (data, rowIndex, colIndex) {
3985
4179
  this.clipboardModule.paste(data, rowIndex, colIndex);
3986
4180
  };
3987
4181
  /**
3988
- * Selects a cell by the given index.
4182
+ * Selects a cell by its index position in the TreeGrid.
3989
4183
  *
3990
- * @param {IIndex} cellIndex - Defines the row and column indexes.
3991
- * @param {boolean} isToggle - If set to true, then it toggles the selection.
4184
+ * Useful for navigating or highlighting specific data cells within the grid.
4185
+ *
4186
+ * @param {IIndex} cellIndex - An object specifying the row and column indexes.
4187
+ * @param {boolean} isToggle - (Optional) If true, toggles the selection state of the cell.
3992
4188
  * @returns {void}
3993
4189
  */
3994
4190
  TreeGrid.prototype.selectCell = function (cellIndex, isToggle) {
3995
4191
  this.grid.selectCell(cellIndex, isToggle);
3996
4192
  };
3997
4193
  /**
3998
- * Gets the collection of selected rows.
4194
+ * Retrieves the currently selected rows.
4195
+ *
4196
+ * Useful for obtaining the selected data elements for downstream processing.
3999
4197
  *
4000
- * @returns {Element[]} - Returns selected row elements collection
4198
+ * @returns {Element[]} - An array of Element objects representing the selected rows.
4001
4199
  */
4002
4200
  TreeGrid.prototype.getSelectedRows = function () {
4003
4201
  return this.grid.getSelectedRows();
@@ -4209,44 +4407,59 @@ var TreeGrid = /** @class */ (function (_super) {
4209
4407
  return cnt;
4210
4408
  };
4211
4409
  /**
4212
- * Gets the collection of selected row indexes.
4410
+ * Retrieves the indexes of the currently selected rows in the TreeGrid.
4411
+ *
4412
+ * This method is useful when you need to perform actions based on the selected rows,
4413
+ * such as retrieving data or changing the selection.
4213
4414
  *
4214
- * @returns {number[]} - Returns selected rows index collection
4415
+ * @returns {number[]} - An array of numbers representing the indexes of selected rows.
4215
4416
  */
4216
4417
  TreeGrid.prototype.getSelectedRowIndexes = function () {
4217
4418
  return this.grid.getSelectedRowIndexes();
4218
4419
  };
4219
4420
  /**
4220
- * Gets the collection of selected row and cell indexes.
4421
+ * Retrieves the indexes of the selected cells within the selected rows.
4221
4422
  *
4222
- * @returns {ISelectedCell[]} - Returns selected cell's index details
4423
+ * This can be useful for handling cell-specific operations, such as
4424
+ * applying styles or editing values programmatically.
4425
+ *
4426
+ * @returns {ISelectedCell[]} - An array of objects representing the selected cells' indexes.
4223
4427
  */
4224
4428
  TreeGrid.prototype.getSelectedRowCellIndexes = function () {
4225
4429
  return this.grid.getSelectedRowCellIndexes();
4226
4430
  };
4227
4431
  /**
4228
- * Gets the collection of selected records.
4432
+ * Retrieves the data records corresponding to the currently selected rows.
4433
+ *
4434
+ * This method provides the full record data for the selected rows,
4435
+ * which is useful for data manipulation or extraction operations.
4229
4436
  *
4230
4437
  * @isGenericType true
4231
- * @returns {Object[]} - Returns selected records collection
4438
+ * @returns {Object[]} - An array of data objects representing the selected records.
4232
4439
  */
4233
4440
  TreeGrid.prototype.getSelectedRecords = function () {
4234
4441
  return this.grid.getSelectedRecords();
4235
4442
  };
4236
4443
  /**
4237
- * Gets the data module.
4444
+ * Obtains the data handling modules used by the TreeGrid.
4238
4445
  *
4239
- * @returns {{baseModule: Data, treeModule: DataManipulation}}: Returns grid and treegrid data module
4446
+ * This includes both the base data module for standard grid operations and the tree module
4447
+ * for handling hierarchical data, giving complete access to data management capabilities.
4448
+ *
4449
+ * @returns {{baseModule: Data, treeModule: DataManipulation}} - An object containing both grid and tree data modules.
4240
4450
  */
4241
4451
  TreeGrid.prototype.getDataModule = function () {
4242
4452
  return { baseModule: this.grid.getDataModule(), treeModule: this.dataModule };
4243
4453
  };
4244
4454
  /**
4245
- * Reorder the rows based on given indexes and position
4455
+ * Reorders rows in the TreeGrid based on specified source indexes and a target position.
4456
+ *
4457
+ * This functionality allows for dynamic rearrangement of rows, such as moving selected
4458
+ * rows to a new position as siblings or children.
4246
4459
  *
4247
- * @param {number[]} fromIndexes - Source indexes of rows
4248
- * @param {number} toIndex - Destination index of row
4249
- * @param {string} position - Defines drop position as above or below or child
4460
+ * @param {number[]} fromIndexes - An array indicating the source indexes of the rows to be moved.
4461
+ * @param {number} toIndex - The target index where the rows should be moved.
4462
+ * @param {string} position - The position relative to the target index ('above', 'below', 'child').
4250
4463
  * @returns {void}
4251
4464
  */
4252
4465
  TreeGrid.prototype.reorderRows = function (fromIndexes, toIndex, position) {
@@ -4255,9 +4468,12 @@ var TreeGrid = /** @class */ (function (_super) {
4255
4468
  }
4256
4469
  };
4257
4470
  /**
4258
- * Indents the record to one level of hierarchy. Moves the selected row as the last child of its previous row.
4471
+ * Indents a specified record, promoting it to one level deeper in the hierarchy.
4472
+ *
4473
+ * This function moves the selected row to become the last child of its preceding row,
4474
+ * altering the visual and hierarchical data structure.
4259
4475
  *
4260
- * @param {Object} record specifies the record to do indented
4476
+ * @param {Object} record - (Optional) The record to be indented. If omitted, the currently selected row is used.
4261
4477
  * @returns {void}
4262
4478
  */
4263
4479
  TreeGrid.prototype.indent = function (record) {
@@ -4267,9 +4483,12 @@ var TreeGrid = /** @class */ (function (_super) {
4267
4483
  }
4268
4484
  };
4269
4485
  /**
4270
- * Outdent the record to one level of hierarchy. Moves the selected row as sibling to its parent row.
4486
+ * Outdents a specified record, moving it one level up in the hierarchy.
4271
4487
  *
4272
- * @param {Object} record specifies the record to do outdented
4488
+ * This method repositions the selected row to be a sibling of its parent, impacting
4489
+ * its display and the hierarchical relationships within the TreeGrid.
4490
+ *
4491
+ * @param {Object} record - (Optional) The record to be outdented. If omitted, the currently selected row is used.
4273
4492
  * @returns {void}
4274
4493
  */
4275
4494
  TreeGrid.prototype.outdent = function (record) {
@@ -4465,6 +4684,21 @@ var TreeGrid = /** @class */ (function (_super) {
4465
4684
  __decorate([
4466
4685
  Property('All')
4467
4686
  ], TreeGrid.prototype, "columnQueryMode", void 0);
4687
+ __decorate([
4688
+ Property(true)
4689
+ ], TreeGrid.prototype, "allowSelection", void 0);
4690
+ __decorate([
4691
+ Property(-1)
4692
+ ], TreeGrid.prototype, "selectedRowIndex", void 0);
4693
+ __decorate([
4694
+ Complex({}, SelectionSettings)
4695
+ ], TreeGrid.prototype, "selectionSettings", void 0);
4696
+ __decorate([
4697
+ Property(false)
4698
+ ], TreeGrid.prototype, "allowExcelExport", void 0);
4699
+ __decorate([
4700
+ Property(false)
4701
+ ], TreeGrid.prototype, "allowPdfExport", void 0);
4468
4702
  __decorate([
4469
4703
  Event()
4470
4704
  ], TreeGrid.prototype, "created", void 0);
@@ -4543,9 +4777,6 @@ var TreeGrid = /** @class */ (function (_super) {
4543
4777
  __decorate([
4544
4778
  Event()
4545
4779
  ], TreeGrid.prototype, "queryCellInfo", void 0);
4546
- __decorate([
4547
- Property(true)
4548
- ], TreeGrid.prototype, "allowSelection", void 0);
4549
4780
  __decorate([
4550
4781
  Event()
4551
4782
  ], TreeGrid.prototype, "rowSelecting", void 0);
@@ -4636,18 +4867,6 @@ var TreeGrid = /** @class */ (function (_super) {
4636
4867
  __decorate([
4637
4868
  Event()
4638
4869
  ], TreeGrid.prototype, "rowDrop", void 0);
4639
- __decorate([
4640
- Property(-1)
4641
- ], TreeGrid.prototype, "selectedRowIndex", void 0);
4642
- __decorate([
4643
- Complex({}, SelectionSettings)
4644
- ], TreeGrid.prototype, "selectionSettings", void 0);
4645
- __decorate([
4646
- Property(false)
4647
- ], TreeGrid.prototype, "allowExcelExport", void 0);
4648
- __decorate([
4649
- Property(false)
4650
- ], TreeGrid.prototype, "allowPdfExport", void 0);
4651
4870
  __decorate([
4652
4871
  Event()
4653
4872
  ], TreeGrid.prototype, "pdfQueryCellInfo", void 0);