
# Pivot & Grid

This is an example expressed as GridView and PivotView with the same DataProvider.

#### Pivot & Grid

<GridView demo='pivotguides/02-pivotGrid/01' height={1100}/>

You can connect one dataProvider to your grid and pivot.

```js
dataProvider = new RealGrid.LocalDataProvider();
dataProvider.setFields(fields);

gridView = new RealGrid.GridView(gridContainer);
gridView.setDataSource(dataProvider); //Connect data provider to grid
...

pivot = new RealPivot(pivotContainer);
pivot.setDataProvider(dataProvider); //Connect dataProvider to pivot
...
```