Skip to main content

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

Generates a chart data source from data when Pivot Grid uses both server mode and LINQ provider.

Namespace: DevExpress.Web.Mvc

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

Declaration

public static object GetLINQDataObject(
    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 uses both server mode and LINQ provider, call this method in the controller to create a Chart model and pass it to the corresponding view. The GetLINQDataObject 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 Entity Framework, use the PivotGridExtension.GetEFDataObject 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.

See Also