WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GroupingGridWordConverter

    Show / Hide Table of Contents

    Class GroupingGridWordConverter

    Implements the functionalities of exporting for GridGroupingControl to word file.

    Inheritance
    System.Object
    GridWordConverterBase
    GroupingGridWordConverter
    Inherited Members
    GridWordConverterBase.OnDrawHeader(DocHeaderFooterEventArgs)
    GridWordConverterBase.OnDrawFooter(DocHeaderFooterEventArgs)
    GridWordConverterBase.DrawHeaderFooter(WordDocument, Boolean, Boolean)
    GridWordConverterBase.ShowHeader
    GridWordConverterBase.ShowFooter
    GridWordConverterBase.DrawHeader
    GridWordConverterBase.DrawFooter
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.GridHelperClasses
    Assembly: Syncfusion.GridHelperClasses.Windows.dll
    Syntax
    public class GroupingGridWordConverter : GridWordConverterBase
    Remarks

    It has support for header and footer.

    Examples

    This example shows how to export the GridGroupingControl to word document.

    GroupingGridWordConverter wordGGCConverter = new GroupingGridWordConverter();
    wordGGCConverter.ExportStyle = true;
    wordGGCConverter.ShowFooter = true;
    wordGGCConverter.ShowHeader = true;
    wordGGCConverter.GroupingGridToWord("Sample.docx", this.gridGroupingControl1);
    Dim wordGGCConverter As GroupingGridWordConverter = New GroupingGridWordConverter
    wordGGCConverter.ExportStyle = true
    wordGGCConverter.ShowFooter = true
    wordGGCConverter.ShowHeader = true
    wordGGCConverter.GroupingGridToWord("Sample.docx", Me.gridGroupingControl1)

    Constructors

    GroupingGridWordConverter()

    Initializes a new instance of the GroupingGridWordConverter class.

    Declaration
    public GroupingGridWordConverter()

    GroupingGridWordConverter(Boolean, Boolean)

    Initializes a new instance of the GroupingGridWordConverter class.

    Declaration
    public GroupingGridWordConverter(bool showHeader, bool showFooter)
    Parameters
    Type Name Description
    System.Boolean showHeader

    If True, converts header.

    System.Boolean showFooter

    If True, converts footer.

    Properties

    ExportStyle

    Gets or sets a value indicating whether styles has to be exported.

    Declaration
    public bool ExportStyle { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    When ExportStyle is false exporting to word is optimized.

    UseColumnHeaderText

    Gets or sets a value indicating whether the HeaderText of columns should be exported. True if HeaderText should be shown; Default is false.

    Declaration
    public bool UseColumnHeaderText { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    ExportCaptionRow(Element, WTable)

    Exports the caption row to word document.

    Declaration
    protected virtual void ExportCaptionRow(Element element, WTable wordTable)
    Parameters
    Type Name Description
    Element element

    The element in the grid.

    WTable wordTable

    The table in the word document.

    ExportCellStyle(WTableCell, GridStyleInfo, IWTextRange)

    Export the grid cell styles such as BackColor, Alignments, TextColor and Font to word table cell.

    Declaration
    protected virtual void ExportCellStyle(WTableCell cell, GridStyleInfo cellStyleInfo, IWTextRange textRange)
    Parameters
    Type Name Description
    WTableCell cell

    The Word document current cell.

    GridStyleInfo cellStyleInfo

    Grid cell style information.

    IWTextRange textRange

    Word text range.

    Remarks

    Cell styles such as BackgroundImage, Borders, VerticalScrollbar, ProgressBar, DropdownStyle and NumericUpDown cannot be exported.

    ExportColumnHeader(GridColumnHeaderRow, WTable)

    Exports column headers to word file.

    Declaration
    protected virtual void ExportColumnHeader(GridColumnHeaderRow headerRow, WTable wordTable)
    Parameters
    Type Name Description
    GridColumnHeaderRow headerRow

    The grid column header.

    WTable wordTable

    The table in the word document.

    ExportElements(DisplayElementsInTableCollection, WTable)

    Exports the display elements of grouping grid to word document.

    Declaration
    protected virtual void ExportElements(DisplayElementsInTableCollection dispElements, WTable wordTable)
    Parameters
    Type Name Description
    DisplayElementsInTableCollection dispElements

    The display elements in table collection.

    WTable wordTable

    The table in the word document.

    ExportImage(WTableCell, GridStyleInfo)

    Export the image to word document.

    Declaration
    protected virtual void ExportImage(WTableCell cell, GridStyleInfo styleInfo)
    Parameters
    Type Name Description
    WTableCell cell

    Word document current cell.

    GridStyleInfo styleInfo

    Grid cell style information.

    ExportNestedTable(GridNestedTable, WTable)

    Export the nested table to word document.

    Declaration
    protected virtual void ExportNestedTable(GridNestedTable nestedTable, WTable wordTable)
    Parameters
    Type Name Description
    GridNestedTable nestedTable

    Grid nested table.

    WTable wordTable

    The table in the word document.

    ExportRecord(GridRecordRow, WTable)

    Exports the grid records to word.

    Declaration
    protected virtual void ExportRecord(GridRecordRow recordRow, WTable wordTable)
    Parameters
    Type Name Description
    GridRecordRow recordRow

    The grid record row.

    WTable wordTable

    The table in the word document.

    ExportSummaryRow(GridSummaryRow, WTable)

    Export the summary row to table in word document.

    Declaration
    protected virtual void ExportSummaryRow(GridSummaryRow summaryRow, WTable wordTable)
    Parameters
    Type Name Description
    GridSummaryRow summaryRow

    The grid summary row.

    WTable wordTable

    Table in the word document.

    GetGroupCaptionDisplayText(Group, String)

    Gets caption text for a group.

    Declaration
    protected 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
    protected static string GetGroupCaptionText(Group group)
    Parameters
    Type Name Description
    Group group

    Group to get caption text from.

    Returns
    Type Description
    System.String

    Caption text.

    GroupingGridToWord(GridGroupingControl, WordDocument)

    Exports grouping grid to a word document.

    Declaration
    public void GroupingGridToWord(GridGroupingControl grid, WordDocument doc)
    Parameters
    Type Name Description
    GridGroupingControl grid

    The GridGroupingControl.

    WordDocument doc

    The word document.

    GroupingGridToWord(String, GridGroupingControl)

    Exports grouping grid contents to a word document.

    Declaration
    public void GroupingGridToWord(string filename, GridGroupingControl grid)
    Parameters
    Type Name Description
    System.String filename

    The name of the file.

    GridGroupingControl grid

    The GridGroupingControl.

    OnExportNestedTable(ExportNestedTableEventArgs)

    Raises the QueryExportNestedTable event.

    Declaration
    protected void OnExportNestedTable(ExportNestedTableEventArgs e)
    Parameters
    Type Name Description
    ExportNestedTableEventArgs e

    The ExportNestedTableEventArgs that contains the event data.

    OnExportRowRange(QueryExportRowRangeEventArgs)

    Raises the QueryExportRowRange event.

    Declaration
    protected void OnExportRowRange(QueryExportRowRangeEventArgs e)
    Parameters
    Type Name Description
    QueryExportRowRangeEventArgs e

    The QueryExportRowRangeEventArgs that contains the event data.

    OnQueryExportCellRange(QueryExportCellRangeEventArgs)

    Raises the QueryExportCellRange event.

    Declaration
    protected void OnQueryExportCellRange(QueryExportCellRangeEventArgs e)
    Parameters
    Type Name Description
    QueryExportCellRangeEventArgs e

    The QueryExportCellRangeEventArgs that contains the event data.

    Events

    QueryExportCellRange

    Occurs whenever cell range is exported.

    Declaration
    public event GroupingGridWordConverter.QueryExportCellRangeEventHandler QueryExportCellRange
    Event Type
    Type Description
    GroupingGridWordConverter.QueryExportCellRangeEventHandler

    QueryExportNestedTable

    Occurs whenever nested table is exported.

    Declaration
    public event GroupingGridWordConverter.ExportNestedTableEventHandler QueryExportNestedTable
    Event Type
    Type Description
    GroupingGridWordConverter.ExportNestedTableEventHandler

    QueryExportRowRange

    Occurs whenever row element is exported.

    Declaration
    public event GroupingGridWordConverter.QueryExportRowRangeEventHandler QueryExportRowRange
    Event Type
    Type Description
    GroupingGridWordConverter.QueryExportRowRangeEventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved