Skip to main content
A newer version of this page is available. .

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

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

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v18.2.dll

Declaration

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

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 catching unhandled/CLR exceptions that appear.

applyClientState Boolean

A System.Boolean value that specifies whether to apply the pivot grid’s client state to a chart data source.

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