Class GroupingGridExcelConverterControl
GroupingGridExcelConverterControl class provides support for Exporting data from a GroupingGridControl into an Excel spreadsheet for verification and/or computation. This Control automatically Copies the Grid's Styles, Formats to Excel. The GroupingGridExcelConverter Control is derived from GridExcelConverterBase.
Inherited Members
Namespace: Syncfusion.GroupingGridExcelConverter
Assembly: Syncfusion.GridConverter.Windows.dll
Syntax
public class GroupingGridExcelConverterControl : GridExcelConverterBase
Constructors
GroupingGridExcelConverterControl()
Initializes a new instance of the GroupingGridExcelConverterControl class.
Declaration
public GroupingGridExcelConverterControl()
Properties
ApplyExcelFilter
Gets or sets the value indicating whether Excel filter has to be applied in Excel sheet.
Declaration
public bool ApplyExcelFilter { get; set; }
Property Value
Type |
---|
System.Boolean |
CaptionBackColor
Gets or sets the caption cell's back color in the worksheet.
Declaration
public Color CaptionBackColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
ExportCaptionSummary
Gets or sets whether the caption summary row if enabled, can be exported to excel. Default is true.
Declaration
public bool ExportCaptionSummary { get; set; }
Property Value
Type |
---|
System.Boolean |
ExportGroupPlusMinus
Gets or sets a value indicating whether the Grouping.Group should be exported as Excel Group.
Declaration
public bool ExportGroupPlusMinus { get; set; }
Property Value
Type |
---|
System.Boolean |
ExportPreviewRows
Gets or sets a value indicating whether the PreviewRows should be exported. The default value is false.
Declaration
public bool ExportPreviewRows { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
When you are not exporting with Visible option then, the QueryExportPreviewRowInfo event must be handled.
ExportRecordPlusMinus
Gets or sets a value indicating whether the Record with related tables should be exported as Excel Group.
Declaration
public bool ExportRecordPlusMinus { get; set; }
Property Value
Type |
---|
System.Boolean |
ExportStyle
Gets or sets a value indicating whether the styles has to be exported.
Declaration
public override bool ExportStyle { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
GroupingGrid
Gets or sets the grouping grid of the GroupingGridExcelConverterControl.
Declaration
protected GridGroupingControl GroupingGrid { get; set; }
Property Value
Type |
---|
GridGroupingControl |
IsGroupingGrid
Gets a value indicating whether it is a grouping grid.
Declaration
protected override bool IsGroupingGrid { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
UseDefaultAlignment
Gets a value Indicating whether default alignment setting should be used when alignment wasn't set. Read-only.
Declaration
public override bool UseDefaultAlignment { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Methods
GetCaptionText(GridCaptionRow)
Retrieves caption text from caption row.
Declaration
public static string GetCaptionText(GridCaptionRow caption)
Parameters
Type | Name | Description |
---|---|---|
GridCaptionRow | caption | Caption row to get text from. |
Returns
Type | Description |
---|---|
System.String | Caption text. |
GetGroupCaptionDisplayText(Group, String)
Gets caption text for a group.
Declaration
public static string GetGroupCaptionDisplayText(Group group, string format)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The group to get caption text for. |
System.String | format | Caption format. |
Returns
Type | Description |
---|---|
System.String | Caption text for the group. |
GetGroupCaptionText(Group)
Retrieves caption text for group.
Declaration
public static string GetGroupCaptionText(Group group)
Parameters
Type | Name | Description |
---|---|---|
Group | group | Group to get caption text from. |
Returns
Type | Description |
---|---|
System.String | Caption text. |
GroupingGridToExcel(GridGroupingControl, IWorksheet, ConverterOptions)
Exports the grouping grid into excel file.
Declaration
public void GroupingGridToExcel(GridGroupingControl grouping, IWorksheet sheet, ConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
GridGroupingControl | grouping | The source grouping grid. |
IWorksheet | sheet | The destination worksheet. |
ConverterOptions | options | The converter options. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
GroupingGridToExcel(GridGroupingControl, String, ConverterOptions)
Exports the grouping grid into excel file. Grid will accept .Net format Strings (Such as "F4" for a number with four decimal places) that are not valid with excel. Hence they will be exported as string instead of format like if you specify the format "F3", then the cell will have the string "F3".
Declaration
public void GroupingGridToExcel(GridGroupingControl grouping, string strFileName, ConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
GridGroupingControl | grouping | The source grouping grid. |
System.String | strFileName | The destination worksheet. |
ConverterOptions | options | The converter options. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.ArgumentException | If |
Events
ExportElement
Occurs for each element before the GroupingGridExcelConverterControl exports and lets users to cancel exporting the element.
Declaration
public event GroupingGridExcelConverterControl.GridExportElementEventHandler ExportElement
Event Type
Type |
---|
GroupingGridExcelConverterControl.GridExportElementEventHandler |
QueryCaptionText
Occurs for each CaptionRow before the GroupingGridExcelConverterControl exports and lets users customize the CaptionText.
Declaration
public event GroupingGridExcelConverterControl.GridQueryCaptionTextEventHandler QueryCaptionText
Event Type
Type |
---|
GroupingGridExcelConverterControl.GridQueryCaptionTextEventHandler |
QueryExportPreviewRowInfo
Occurs for each preview row element before the GroupingGridExcelConverterControl exports and lets users customize the preview row.
Declaration
public event GroupingGridExcelConverterControl.GroupingGridExportPreviewRowQueryInfoEventHandler QueryExportPreviewRowInfo
Event Type
Type |
---|
GroupingGridExcelConverterControl.GroupingGridExportPreviewRowQueryInfoEventHandler |