1+ import * as React from 'react' ;
2+ import { ColumnDirective , ColumnsDirective , GridComponent , Inject , Page , Sort } from '@syncfusion/ej2-react-grids' ;
3+ import { registerLicense } from '@syncfusion/ej2-base' ;
4+
5+ registerLicense ( process . env . REACT_APP_SYNCFUSION_LICENSE_KEY ) ;
6+
7+ export default function App ( ) {
8+
9+ const data = [
10+ { OrderID : 10248 , CustomerID : 'VINET' , ShipCountry : 'France' } ,
11+ { OrderID : 10249 , CustomerID : 'TOMSP' , ShipCountry : 'Germany' } ,
12+ { OrderID : 10250 , CustomerID : 'HANAR' , ShipCountry : 'Brazil' } ,
13+ { OrderID : 10251 , CustomerID : 'VICTE' , ShipCountry : 'Venezuela' } ,
14+ { OrderID : 10252 , CustomerID : 'SUPRD' , ShipCountry : 'Belgium' } ,
15+ { OrderID : 10253 , CustomerID : 'CHOPS' , ShipCountry : 'Switzerland' }
16+ ] ;
17+
18+ return ( < React . Fragment >
19+ < h2 > Syncfusion React Grid Component</ h2 >
20+ < GridComponent dataSource = { data } allowPaging = { true } pageSettings = { { pageSize : 5 } } >
21+ < ColumnsDirective >
22+ < ColumnDirective field = 'OrderID' width = '100' />
23+ < ColumnDirective field = 'CustomerID' width = '100' />
24+ < ColumnDirective field = 'ShipCountry' width = '100' />
25+ </ ColumnsDirective >
26+ < Inject services = { [ Page , Sort ] } />
27+ </ GridComponent >
28+ </ React . Fragment > ) ;
29+ } ;
0 commit comments