# Remote Flat Data Binding

You can bind the Kendo UI for jQuery PivotGridV2 to JSON data fetched from a remote end point.

For a runnable example on how to bind the PivotGridV2 to a remote flat data review the dedicated demo.

* [Demo page for the PivotGridV2 Remote Binding](https://demos.telerik.com/kendo-ui/pivotgridv2/remote-flat-data-binding)

## Bind the Data

The code snippet below showcases a small data sample from the [Remote Binding demo](https://demos.telerik.com/kendo-ui/pivotgridv2/remote-flat-data-binding).

```javascript
[{ ProductID: 1, ProductName: "Chai", UnitPrice: "18.00"},
{ ProductID: 2, ProductName: "Chang", UnitPrice: "19.00"},
{ ProductID: 3, ProductName: "Aniseed Syrup", UnitPrice: "10.00"}]
```

The following code snippet showcases how you can use the [`transport`](https://www.telerik.com/kendo-jquery-ui/documentation/api/data/pivotdatasourcev2/configuration/transport) option to read the data from the remote end point.

```javascript
$("#pivotgrid").kendoPivotGridV2({
    dataSource: {
		transport: {
			read: "https://demos.telerik.com/service/v2/core/Products"
		}
        ......
    }
});
```

## Columns and Rows

You can construct the PivotGridV2 table by using the fields from the sample data in the [previous section](https://www.telerik.com/kendo-jquery-ui/documentation/controls/pivotgridv2/binding/remote-flat-binding#bind-the-data).

1. Configure the [`schema`](https://www.telerik.com/kendo-jquery-ui/documentation/api/data/pivotdatasource/configuration/schema#schemacube).

```javascript
         schema: {
 			model: {
 				fields: {
 					ProductID: { type: "number" },
 					ProductName: { type: "string" },
 					// The service returns UnitPrice as a string, so convert it to a number.
 					UnitPrice: { type: "number" }
 				}
 			},
 			cube: {
 				dimensions: {
 					ProductID: { caption: "All Products" },
 					ProductName: { caption: "All Names" },
 					UnitPrice: { caption: "Total Price" }
 				},
 				measures: {
 					"Price Sum": { field: "UnitPrice", aggregate: "sum" }
 				}
 			}
 		},
```

2. Configure the columns, rows, and measures.

```javascript
        columns: [{ name: "ProductName", expand: true }],
 		rows: [{ name: "ProductID", expand: true }],
 		measures: ["Price Sum"]
```

## Known Limitations

The known limitations are listed in the [following link](https://www.telerik.com/kendo-jquery-ui/documentation/controls/pivotgridv2/binding/local-binding#known-limitations).
