import { Component, ViewChild, OnInit } from '@angular/core'; import { jqxGridComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxgrid' @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent implements OnInit { @ViewChild('myGrid') myGrid: jqxGridComponent; ngOnInit(): void { this.generateData(); } columns: any[] = []; datafields: any[] = []; source: any = { unboundmode: true, totalrecords: 100, datafields: this.datafields } getWidth() : any { if (document.body.offsetWidth < 850) { return '90%'; } return 850; } dataAdapter: any = new jqx.dataAdapter(this.source); numberrenderer = (row: number, column: any, value: any): string => { return '