PivotGridExtension.GetEFDataObject(PivotGridSettings, EventHandler<LinqServerModeDataSourceSelectEventArgs>) Method
Generates a chart data source from data when Pivot Grid uses both server mode and Entity Framework.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v26.1.dll
Declaration
public static object GetEFDataObject(
PivotGridSettings pivotGridSettings,
EventHandler<LinqServerModeDataSourceSelectEventArgs> selectingMethod
)
Parameters
| Name | Type | Description |
|---|---|---|
| pivotGridSettings | PivotGridSettings | A PivotGridSettings object that specifies pivot grid settings defining how to generate a chart data source. |
| selectingMethod | EventHandler<LinqServerModeDataSourceSelectEventArgs> | A method to which selection logic is delegated. |
Returns
| Type | Description |
|---|---|
| Object | A chart data source. |
Remarks
If the PivotGrid extension uses both server mode and Entity Framework, call this method in the controller to create a Chart model and pass it to the corresponding view. The GetEFDataObject method internally creates a Pivot Grid extension based on the specified settings, binds it to the specified data source, and returns the chart data source generated by that Pivot Grid.
If the PivotGrid extension uses both server mode and LINQ provider, use the PivotGridExtension.GetLINQDataObject method instead. To create a chart data source from regular data, call the PivotGridExtension.GetDataObject method. To create a chart data source from OLAP data, use a PivotGridExtension.GetDataObject method overload that accepts an olapConnectionString parameter.