Skip to content

Commit 8247784

Browse files
DataGrid Overview Demo: Replace ODataSource with local data (#31732)
1 parent 84e062b commit 8247784

File tree

12 files changed

+84514
-82
lines changed

12 files changed

+84514
-82
lines changed

apps/demos/Demos/DataGrid/Overview/Angular/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<dx-data-grid
22
id="gridContainer"
3-
[dataSource]="dataSource"
4-
[remoteOperations]="false"
3+
[dataSource]="sales"
4+
keyExpr="Id"
55
[allowColumnReordering]="true"
66
[rowAlternationEnabled]="true"
77
[showBorders]="true"

apps/demos/Demos/DataGrid/Overview/Angular/app/app.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { NgModule, Component, enableProdMode } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4-
import { DataSource } from 'devextreme-angular/common/data';
54
import { DxBulletModule } from 'devextreme-angular';
65
import { DxDataGridModule, DxDataGridTypes } from 'devextreme-angular/ui/data-grid';
7-
import { Service } from './app.service';
6+
import { Sale, Service } from './app.service';
87

98
if (!/localhost/.test(document.location.host)) {
109
enableProdMode();
@@ -23,7 +22,7 @@ if (window && window.config?.packageConfigPaths) {
2322
providers: [Service],
2423
})
2524
export class AppComponent {
26-
dataSource: DataSource;
25+
sales: Sale[];
2726

2827
collapsed = false;
2928

@@ -37,7 +36,7 @@ export class AppComponent {
3736
customizeTooltip = ({ originalValue }: Record<string, string>) => ({ text: `${parseInt(originalValue)}%` });
3837

3938
constructor(service: Service) {
40-
this.dataSource = service.getDataSource();
39+
this.sales = service.getSales();
4140
}
4241
}
4342

0 commit comments

Comments
 (0)