setPersistData(){
console.log('setting persist data', this.persistData);
this.grid.setProperties(this.persistData.columns)
delete this.persistData.columns; // remove columns
this.grid.setProperties(this.persistData); // assign other property
}
|
public ngOnInit(): void {
this.grid.getCurrentViewRecords = function () {
if (isGroupAdaptive(this)) {
return isNullOrUndefined((this.currentViewData as Object[] & { records: Object[] }).records) ?
this.currentViewData : (this.currentViewData as Object[] & { records: Object[] }).records;
}
return (this.allowGrouping && this.groupSettings.columns.length && this.currentViewData.length && (this.currentViewData as Object[] & { records: Object[] }).records) ?
(this.currentViewData as Object[] & { records: Object[] }).records : this.currentViewData;
}
}
|