New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring PivotGridV2ExcelSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class PivotGridV2ExcelSettingsBuilder<T> where T : class

Inheritance: objectPivotGridV2ExcelSettingsBuilder<T>

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public PivotGridV2ExcelSettingsBuilder(PivotGridV2ExcelSettings container)
Parameters:containerPivotGridV2ExcelSettings

Properties

C#
protected PivotGridV2ExcelSettings Container { get; }

Methods

Specifies the file name of the exported Excel file.

C#
public PivotGridV2ExcelSettingsBuilder<T> FileName(string value)
Parameters:valuestring

The value that configures the file name.

Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.FileName("PivotGridV2_Export.xlsx"))
)

Enables or disables the column filtering in the exported Excel file.

C#
public PivotGridV2ExcelSettingsBuilder<T> Filterable()
Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.Filterable())
)

Enables or disables the column filtering in the exported Excel file.

C#
public PivotGridV2ExcelSettingsBuilder<T> Filterable(bool value)
Parameters:valuebool

The value that toggles the column filtering option.

Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.Filterable(true))
)

If enabled, the content will be forwarded to the specified ProxyURL even if the browser supports saving files locally.

C#
public PivotGridV2ExcelSettingsBuilder<T> ForceProxy()
Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.ForceProxy().ProxyURL(Url.Action("ExportSave", "Home")))
)

If set to "true", the content will be forwarded to the specified ProxyURL even if the browser supports saving files locally.

C#
public PivotGridV2ExcelSettingsBuilder<T> ForceProxy(bool value)
Parameters:valuebool

The value that enables or disabled the ForceProxy option.

Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.ForceProxy(true).ProxyURL(Url.Action("ExportSave", "Home")))
)

The URL of the server side proxy that will stream the file to the end user. The developer is responsible for implementing the server-side proxy. The proxy will receive a POST request with the following parameters in the request body:

  • contentType: The MIME type of the file.
  • base64: The base-64 encoded file content.
  • fileName: The file name, as requested by the caller.

The proxy must return the decoded file with the "Content-Disposition" header set to 'attachment; filename="<fileName.xslx>"'.

C#
public PivotGridV2ExcelSettingsBuilder<T> ProxyURL(string value)
Parameters:valuestring

The value that configures the proxy URL.

Returns:

PivotGridV2ExcelSettingsBuilder<T>

Example:
C#
@(Html.Kendo().PivotGridV2()
.Name("pivotgrid")
.Excel(excel =&gt; excel.ProxyURL(Url.Action("ExportSave", "Home")))
)