@@ -41,7 +41,7 @@ import { cloneArray, mergeObjects, compareMaps, resolveNestedPath, isObject, Pla
41
41
import { GridColumnDataType } from '../data-operations/data-util' ;
42
42
import { FilteringLogic , IFilteringExpression } from '../data-operations/filtering-expression.interface' ;
43
43
import { IGroupByRecord } from '../data-operations/groupby-record.interface' ;
44
- import { IgxGridForOfDirective } from '../directives/for-of/for_of.directive' ;
44
+ import { IForOfDataChangingEventArgs , IgxGridForOfDirective } from '../directives/for-of/for_of.directive' ;
45
45
import { IgxTextHighlightDirective } from '../directives/text-highlight/text-highlight.directive' ;
46
46
import { ISummaryExpression } from './summaries/grid-summary' ;
47
47
import { RowEditPositionStrategy , IPinningConfig } from './grid.common' ;
@@ -1060,6 +1060,29 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
1060
1060
@Output ( )
1061
1061
public localeChange = new EventEmitter < boolean > ( ) ;
1062
1062
1063
+ /**
1064
+ * Emitted before the grid's data view is changed because of a data operation, rebinding, etc.
1065
+ *
1066
+ * @example
1067
+ * ```typescript
1068
+ * <igx-grid #grid [data]="localData" [autoGenerate]="true" (dataPreLoad)='handleDataPreloadEvent()'></igx-grid>
1069
+ * ```
1070
+ */
1071
+ @Output ( )
1072
+ public dataChanging = new EventEmitter < IForOfDataChangingEventArgs > ( ) ;
1073
+
1074
+ /**
1075
+ * Emitted after the grid's data view is changed because of a data operation, rebinding, etc.
1076
+ *
1077
+ * @example
1078
+ * ```typescript
1079
+ * <igx-grid #grid [data]="localData" [autoGenerate]="true" (dataPreLoad)='handleDataPreloadEvent()'></igx-grid>
1080
+ * ```
1081
+ */
1082
+ @Output ( )
1083
+ public dataChanged = new EventEmitter < any > ( ) ;
1084
+
1085
+
1063
1086
/**
1064
1087
* @hidden @internal
1065
1088
*/
@@ -3387,6 +3410,20 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
3387
3410
}
3388
3411
}
3389
3412
3413
+ /**
3414
+ * @hidden @internal
3415
+ */
3416
+ public dataRebinding ( event : IForOfDataChangingEventArgs ) {
3417
+ this . dataChanging . emit ( event )
3418
+ }
3419
+
3420
+ /**
3421
+ * @hidden @internal
3422
+ */
3423
+ public dataRebound ( event ) {
3424
+ this . dataChanged . emit ( event ) ;
3425
+ }
3426
+
3390
3427
/** @hidden @internal */
3391
3428
public createFilterDropdown ( column : ColumnType , options : OverlaySettings ) {
3392
3429
options . outlet = this . outlet ;
0 commit comments