import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent { source: any = { localData: this.generateData(), dataType: 'array' }; dataAdapter: any = new jqx.dataAdapter(this.source); getWidth() : any { if (document.body.offsetWidth < 850) { return '90%'; } return 850; } columns: any[] = [ { text: 'Photo', align: 'center', dataField: 'firstname', width: 80, // row - row's index. // column - column's data field. // value - cell's value. // rowData - rendered row's object. cellsRenderer: (row: any, column: any, value: any, rowData: any): string => { let image = '