Skip to main content

PivotGridExtension.GetEFDataObject(PivotGridSettings, EventHandler<LinqServerModeDataSourceSelectEventArgs>, EventHandler<ServerModeExceptionThrownEventArgs>) Method

Generates a chart data source from data when the Pivot Grid operates in server mode using Entity Framework.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public static object GetEFDataObject(
    PivotGridSettings pivotGridSettings,
    EventHandler<LinqServerModeDataSourceSelectEventArgs> selectingMethod,
    EventHandler<ServerModeExceptionThrownEventArgs> exceptionThrownMethod
)

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.

exceptionThrownMethod EventHandler<ServerModeExceptionThrownEventArgs>

A delegate method that allows you to catch unhandled/CLR exceptions.

Returns

Type Description
Object

A chart data source.

Remarks

If the PivotGrid extension operates in server mode using Entity Framework, use the static GetEFDataObject method in the controller to create a model for a Chart extension and pass it to the corresponding view. The GetEFDataObject method internally creates a PivotGrid extension based on the provided settings, binds it to the specified data source and returns a chart data source provided by the created Pivot Grid.

If the PivotGrid extension operates in server mode using a LINQ provider, use the PivotGridExtension.GetLINQDataObject method. To create a chart data source from regular data, use the PivotGridExtension.GetDataObject method. To create a chart data source from OLAP data, use another overload of the PivotGridExtension.GetDataObject method that takes an olapConnectionString parameter.

See Also