diff --git a/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.html b/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.html index def29eba455a..dcbc7f22dbea 100644 --- a/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.html +++ b/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.html @@ -2,7 +2,7 @@ id="gridContainer" [dataSource]="customers" keyExpr="ID" - [columns]="['CompanyName', 'City', 'State', 'Phone', 'Fax']" [showBorders]="true" > + diff --git a/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.ts b/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.ts index 7ea2d957c548..3e91c841e452 100644 --- a/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.ts +++ b/apps/demos/Demos/DataGrid/SimpleArray/Angular/app/app.component.ts @@ -22,6 +22,8 @@ if (window && window.config.packageConfigPaths) { export class AppComponent { customers: Customer[]; + columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax']; + constructor(service: Service) { this.customers = service.getCustomers(); } diff --git a/apps/demos/Demos/DataGrid/SimpleArray/React/App.tsx b/apps/demos/Demos/DataGrid/SimpleArray/React/App.tsx index 6b9c95421931..39cf9083f253 100644 --- a/apps/demos/Demos/DataGrid/SimpleArray/React/App.tsx +++ b/apps/demos/Demos/DataGrid/SimpleArray/React/App.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import DataGrid from 'devextreme-react/data-grid'; +import DataGrid, { Column } from 'devextreme-react/data-grid'; import { customers } from './data.ts'; const columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax']; @@ -10,7 +10,9 @@ const App = () => ( keyExpr="ID" defaultColumns={columns} showBorders={true} - /> + > + { columns.map((column, index) => ) } + ); export default App; diff --git a/apps/demos/Demos/DataGrid/SimpleArray/ReactJs/App.js b/apps/demos/Demos/DataGrid/SimpleArray/ReactJs/App.js index 68b339b61860..fc77729526e5 100644 --- a/apps/demos/Demos/DataGrid/SimpleArray/ReactJs/App.js +++ b/apps/demos/Demos/DataGrid/SimpleArray/ReactJs/App.js @@ -1,5 +1,5 @@ import React from 'react'; -import DataGrid from 'devextreme-react/data-grid'; +import DataGrid, { Column } from 'devextreme-react/data-grid'; import { customers } from './data.js'; const columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax']; @@ -9,6 +9,13 @@ const App = () => ( keyExpr="ID" defaultColumns={columns} showBorders={true} - /> + > + {columns.map((column, index) => ( + + ))} + ); export default App; diff --git a/apps/demos/Demos/DataGrid/SimpleArray/Vue/App.vue b/apps/demos/Demos/DataGrid/SimpleArray/Vue/App.vue index a0865d4f59d8..0d96cd05dc34 100644 --- a/apps/demos/Demos/DataGrid/SimpleArray/Vue/App.vue +++ b/apps/demos/Demos/DataGrid/SimpleArray/Vue/App.vue @@ -2,13 +2,17 @@ + > + + + const columns = ['CompanyName', 'City', 'State', 'Phone', 'Fax']; + \ No newline at end of file