App.component.html
<div class="control-section">
<ejs-grid #grid [dataSource]='data' [query]="query" [pageSettings]='pageSettings'>
<e-columns>
<e-column field='UserName' headerText='Customer ID' width='160'></e-column>
<e-column field='FirstName' width='120' textAlign='Right'></e-column>
<e-column field='LastName' width='150' ></e-column>
</e-columns>
</ejs-grid>
</div>
|
App.component.ts
const SERVICE_URI: string = 'https://services.odata.org/V4/(S(0j5uiuuhvaybfuc2llcclf3g))/TripPinServiceRW/People';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
public data: DataManager;
public pageSettings: Object;
public query:any
@ViewChild('grid',{static: true})
public grid: GridComponent;
ngOnInit(): void {
this.data= new DataManager({ url: SERVICE_URI, adaptor: new ODataV4Adaptor })
this.query = new Query().expand('Trips');
}
}
|
this.query = new Query().expand('Products($expand=Customer)'); |