setDataProvider
Description
그리드에 Data Provider를 연결한다.
Syntax
function setDataProvider(provider)
Parameters
provider
Type: LocalDataProvider
Data Provider
Return value
None.
Examples
$(function() { dataProvider = new RealGridJS.LocalDataProvider(); setFields(dataProvider); pivot = new RealPivot(id); pivot.setDataProvider(dataProvider); pivot.drawView(); }); function setFields(provider) { var fields = [{ fieldName: "OrderID" }, { fieldName: "CustomerID" }, { fieldName: "EmployeeID" }, { fieldName: "Quantity", dataType: "number" }, { fieldName: "UnitPrice", dataType: "number" }]; provider.setFields(fields); }