menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridPrintManager - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridPrintManager

    Inheritance
    System.Object
    PrintManagerBase
    GridPrintManager
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Inherited Members
    PrintManagerBase.AddCaptionSummaryInfoToDict(Object, List<String>, Double, Int32, Int32)
    PrintManagerBase.AddCaptionSummaryRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AddDataRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AddHeaderRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AddParentRecordInfoToDict(List<RowInfo>, Object, List<String>, Double, Int32, Int32)
    PrintManagerBase.AddStackedHeaderRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AddSummaryInfoToDict(Object, List<String>, Double, Int32, Int32)
    PrintManagerBase.AddSummaryRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AddTableSummaryInfoToDict(Object, List<String>, Double, Int32, Int32)
    PrintManagerBase.AddTableSummaryRowToPanel(PrintPagePanel, RowInfo)
    PrintManagerBase.AllowColumnWidthFitToPrintPage
    PrintManagerBase.AllowPrintByDrawing
    PrintManagerBase.AllowPrintStyles
    PrintManagerBase.AllowRepeatHeaders
    PrintManagerBase.CanPrintStackedHeaders
    PrintManagerBase.ComputeColumnForPage(Int32, List<String>, Size, Int32, Int32)
    PrintManagerBase.ComputePages(IList, Size)
    PrintManagerBase.CreatePage(Int32)
    PrintManagerBase.CreatePage(Int32, PrintPageControl)
    PrintManagerBase.Dispose()
    PrintManagerBase.Dispose(Boolean)
    PrintManagerBase.GetColumnHeaderElement(String)
    PrintManagerBase.GetFormattedText(RowInfo, CellInfo, String)
    PrintManagerBase.GetPagesPerRecord(List<String>, Double)
    PrintManagerBase.GetPrintDocument()
    PrintManagerBase.GetPrintDocument(Int32, Int32)
    PrintManagerBase.GetRecordFromSourceList(Int32)
    PrintManagerBase.GetRowHeight(Object, Int32, RowType)
    PrintManagerBase.GetStackedColumnHeaderElement(String)
    PrintManagerBase.GetTableSummaryList(TableSummaryRowPosition)
    PrintManagerBase.GetTotalRecordCount()
    PrintManagerBase.GetTotalRecordsHeight()
    PrintManagerBase.IndentColumnWidth
    PrintManagerBase.InitializeHeadersForPage(List<RowInfo>, Int32, List<String>, Int32, Int32)
    PrintManagerBase.InitializePrint(Boolean)
    PrintManagerBase.OnDrawCheckBox(DrawingContext, RowInfo, CellInfo, GridColumn)
    PrintManagerBase.OnDrawImage(DrawingContext, RowInfo, CellInfo, Image)
    PrintManagerBase.OnDrawText(DrawingContext, RowInfo, CellInfo, String)
    PrintManagerBase.OnRender(DrawingContext, List<RowInfo>)
    PrintManagerBase.PageDictionary
    PrintManagerBase.Print()
    PrintManagerBase.Print(PrintDialog)
    PrintManagerBase.Print(PrintDialog, Nullable<Boolean>)
    PrintManagerBase.PrintFlowDirection
    PrintManagerBase.PrintHeaderRowHeight
    PrintManagerBase.PrintPageFooterHeight
    PrintManagerBase.PrintPageFooterTemplate
    PrintManagerBase.PrintPageHeaderHeight
    PrintManagerBase.PrintPageHeaderTemplate
    PrintManagerBase.PrintPageHeight
    PrintManagerBase.PrintPageMargin
    PrintManagerBase.PrintPageOrientation
    PrintManagerBase.PrintPageWidth
    PrintManagerBase.PrintRowHeight
    PrintManagerBase.PrintScaleOption
    PrintManagerBase.PrintWithDialog()
    PrintManagerBase.PropertyChanged
    PrintManagerBase.Provider
    PrintManagerBase.SetTotalRecordsHeight(Double)
    PrintManagerBase.ToIEnumerable<NodeEntry>(IEnumerator<NodeEntry>)
    PrintManagerBase.View
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.Grid
    Assembly: Syncfusion.SfGrid.WPF.dll
    Syntax
    public class GridPrintManager : PrintManagerBase, INotifyPropertyChanged, IDisposable

    Constructors

    GridPrintManager(SfDataGrid)

    Initializes a new instance of GridPrintManager class.

    Declaration
    public GridPrintManager(SfDataGrid datagrid)
    Parameters
    Type Name Description
    SfDataGrid datagrid

    The instance of the SfDataGrid.

    Properties

    dataGrid

    Gets the reference to the SfDataGrid control.

    Declaration
    protected SfDataGrid dataGrid { get; }
    Property Value
    Type Description
    SfDataGrid

    The reference to the SfDataGrid control.

    IsCaptionSummaryInRow

    Gets a value that determines whether the corresponding row is CaptionSummaryRow for printing.

    Declaration
    protected override bool IsCaptionSummaryInRow { get; }
    Property Value
    Type Description
    System.Boolean

    true if the row is CaptionSummaryRow; otherwise , false.

    Overrides
    PrintManagerBase.IsCaptionSummaryInRow

    Methods

    AddHeaderInfoToDict(List<String>, Double, Int32, Int32)

    Adds the header information to dictionary that is going to be printed.

    Declaration
    protected override List<CellInfo> AddHeaderInfoToDict(List<string> columnsNames, double yPos, int startColumnIndex, int endColumnIndex)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.String> columnsNames

    The list of column names collection that is used to measures the number of header arranged in a page.

    System.Double yPos

    The y position of the page.

    System.Int32 startColumnIndex

    The start index of the column to add header information for printing.

    System.Int32 endColumnIndex

    The end index of the column to add header information for printing.

    Returns
    Type Description
    System.Collections.Generic.List<CellInfo>

    Returns the list of header cell info that is going to be printed.

    Overrides
    PrintManagerBase.AddHeaderInfoToDict(List<String>, Double, Int32, Int32)

    AddRecordInfoToDict(Object, List<String>, Double, Int32, Int32)

    Adds the record information to dictionary that is going to be printed.

    Declaration
    protected override List<CellInfo> AddRecordInfoToDict(object record, List<string> columnNames, double yPos, int startColumnIndex, int endColumnIndex)
    Parameters
    Type Name Description
    System.Object record

    The corresponding record information that is added in to dictionary for printing.

    System.Collections.Generic.List<System.String> columnNames

    The list of column names collection that is used to measures the number of column arranged in a page.

    System.Double yPos

    The y position of the page.

    System.Int32 startColumnIndex

    The start index of the column to add record information for printing.

    System.Int32 endColumnIndex

    The end index of the column to add record information for printing.

    Returns
    Type Description
    System.Collections.Generic.List<CellInfo>

    Returns the list of record cell info that is going to be printed.

    Overrides
    PrintManagerBase.AddRecordInfoToDict(Object, List<String>, Double, Int32, Int32)

    AddRowInformationToDictionary(Object, List<String>, Double, Int32, Int32)

    Adds the row information to dictionary that is going to be printed.

    Declaration
    protected override List<CellInfo> AddRowInformationToDictionary(object record, List<string> columnNames, double yPos, int startColumnIndex, int endColumnIndex)
    Parameters
    Type Name Description
    System.Object record

    The corresponding record information of row is added to dictionary.

    System.Collections.Generic.List<System.String> columnNames

    The list of column names collection that is used to measures the number of columns arranged in a page.

    System.Double yPos

    The y position of the page.

    System.Int32 startColumnIndex

    The start index of the column to add row information for printing.

    System.Int32 endColumnIndex

    The end index of the column to add row information for printing.

    Returns
    Type Description
    System.Collections.Generic.List<CellInfo>

    Returns the list of cell info that is going to be printed.

    Overrides
    PrintManagerBase.AddRowInformationToDictionary(Object, List<String>, Double, Int32, Int32)
    Remarks

    Invoked to add rows such as normal row, group caption summary row, summary row, table summary row to dictionary for printing.

    AddRowToPrintPagePanel(PrintPagePanel, RowInfo, Int32)

    Adds the row info to the specified print page panel that is going to be printed.

    Declaration
    protected override void AddRowToPrintPagePanel(PrintPagePanel panel, RowInfo rowInfo, int pageIndex)
    Parameters
    Type Name Description
    PrintPagePanel panel

    The corresponding panel to add the row that is to be printed.

    RowInfo rowInfo

    The corresponding row information that is added to panel.

    System.Int32 pageIndex

    The corresponding index of page to add the row to print page panel.

    Overrides
    PrintManagerBase.AddRowToPrintPagePanel(PrintPagePanel, RowInfo, Int32)
    Remarks

    Invoked to add Rows such as Header row,summary(group summary, table summary),Unboundrow, etc... to PrintPagePanel.

    AddStackedHeaderInfotoDict(Double, Int32, Int32, Int32)

    Declaration
    protected override List<CellInfo> AddStackedHeaderInfotoDict(double yPos, int startColumnIndex, int endColumnIndex, int rowStart)
    Parameters
    Type Name Description
    System.Double yPos
    System.Int32 startColumnIndex
    System.Int32 endColumnIndex
    System.Int32 rowStart
    Returns
    Type
    System.Collections.Generic.List<CellInfo>
    Overrides
    PrintManagerBase.AddStackedHeaderInfotoDict(Double, Int32, Int32, Int32)

    AddUnboundRowInfoToDict(Object, List<String>, Double, Int32, Int32)

    Adds the UnBoundRow information to dictionary that is going to be printed.

    Declaration
    protected virtual List<CellInfo> AddUnboundRowInfoToDict(object record, List<string> columnNames, double yPos, int startColumnIndex, int endColumnIndex)
    Parameters
    Type Name Description
    System.Object record

    The corresponding record information of UnboundRow is added to dictionary.

    System.Collections.Generic.List<System.String> columnNames

    The list of column names collection that is used to measures the number of columns arranged in a page.

    System.Double yPos

    The y position of the page.

    System.Int32 startColumnIndex

    The start index of the column to add row information for printing.

    System.Int32 endColumnIndex

    The end index of the column to add row information for printing.

    Returns
    Type Description
    System.Collections.Generic.List<CellInfo>

    Returns the list of UnboundRow cell info that is going to be printed.

    AddUnBoundRowToPrintPagePanel(PrintPagePanel, RowInfo)

    Adds the UnboundRow info to the specified print page panel that is going to be printed.

    Declaration
    protected virtual void AddUnBoundRowToPrintPagePanel(PrintPagePanel panel, RowInfo rowInfo)
    Parameters
    Type Name Description
    PrintPagePanel panel

    The corresponding panel to add the UnboundRow that is to be printed.

    RowInfo rowInfo

    The corresponding UnboundRow information that is added to panel.

    GetColumnElement(Object, String)

    Gets the column element of the specified record and mapping name for printing each GridCell in a column.

    Declaration
    protected override object GetColumnElement(object record, string mappingName)
    Parameters
    Type Name Description
    System.Object record

    Specifies the corresponding record to get the column element.

    System.String mappingName

    The corresponding mappingName of the column to get its column element.

    Returns
    Type Description
    System.Object

    Returns the column element of the specified record and mapping name.

    Overrides
    PrintManagerBase.GetColumnElement(Object, String)
    Remarks

    Override this method and customize the column element based on its record and mapping name.

    GetColumnHeaderText(String)

    Gets the header text of the column for the specified mapping name.

    Declaration
    protected override string GetColumnHeaderText(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mappingName of the column to get its header text.

    Returns
    Type Description
    System.String

    Returns the header text of column for the specified mapping name.

    Overrides
    PrintManagerBase.GetColumnHeaderText(String)
    Remarks

    Override this method and customize the header text of the column based on its mapping name.

    GetColumnNames()

    Gets the list of column names collection that need to be printed.

    Declaration
    protected override List<string> GetColumnNames()
    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    Returns the collection of column name collection that need to be printed.

    Overrides
    PrintManagerBase.GetColumnNames()

    GetColumnPadding(String)

    Gets the padding of the column for the specified mapping name.

    Declaration
    protected override Thickness GetColumnPadding(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mappingName of the column to get its padding.

    Returns
    Type Description
    System.Windows.Thickness

    Returns the padding of column for the specified mapping name.

    Overrides
    PrintManagerBase.GetColumnPadding(String)
    Remarks

    Override this method and customize the padding for column based on its mapping name.

    GetColumnTextAlignment(String)

    Gets the System.Windows.TextAlignment of the column for the specified mapping name.

    Declaration
    protected override TextAlignment GetColumnTextAlignment(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mappingName of the column to get its System.Windows.TextAlignment.

    Returns
    Type Description
    System.Windows.TextAlignment

    Returns the System.Windows.TextAlignment of column for the specified mapping name.

    Overrides
    PrintManagerBase.GetColumnTextAlignment(String)
    Remarks

    Override this method and customize the System.Windows.TextAlignment for column based on its mapping name.

    GetColumnTextWrapping(String)

    Gets the System.Windows.TextWrapping of the column for the specified mapping name.

    Declaration
    protected override TextWrapping GetColumnTextWrapping(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mappingName of the column to get its System.Windows.TextWrapping.

    Returns
    Type Description
    System.Windows.TextWrapping

    Returns the System.Windows.TextWrapping of column for the specified mapping name.

    Overrides
    PrintManagerBase.GetColumnTextWrapping(String)
    Remarks

    Override this method and customize the System.Windows.TextWrapping of column based on its mapping name.

    GetColumnWidth(String)

    Gets the column width for the specified mapping name of column.

    Declaration
    protected override double GetColumnWidth(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mappingName of the column to get its width.

    Returns
    Type Description
    System.Double

    Returns the column width of the specified mapping name.

    Overrides
    PrintManagerBase.GetColumnWidth(String)
    Remarks

    Override this method and customize the column width based on the mapping name of the column.

    GetGroupCaptionStringFormat()

    Gets the string format of group caption.

    Declaration
    protected override string GetGroupCaptionStringFormat()
    Returns
    Type Description
    System.String

    Returns the corresponding string format of group caption.

    Overrides
    PrintManagerBase.GetGroupCaptionStringFormat()
    Remarks

    Override this method and customize string format of group caption.

    GetPrintCaptionSummaryCell(Object, String)

    Returns the caption summary cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintCaptionSummaryCell(object group, string mappingName)
    Parameters
    Type Name Description
    System.Object group
    System.String mappingName

    The corresponding mapping name to print caption summary cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridGridCaptionSummaryCell if the AllowPrintStyles is true; otherwise return the PrintCaptionSummaryCell.

    Overrides
    PrintManagerBase.GetPrintCaptionSummaryCell(Object, String)

    GetPrintGridCell(Object, String)

    Returns the grid cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintGridCell(object record, string mappingName)
    Parameters
    Type Name Description
    System.Object record

    The corresponding record to print grid cell.

    System.String mappingName

    The corresponding mapping name to print grid cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridCell if the AllowPrintStyles is true; otherwise return the PrintGridCell.

    Overrides
    PrintManagerBase.GetPrintGridCell(Object, String)

    GetPrintGroupSummaryCell(Object, String)

    Returns the group summary cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintGroupSummaryCell(object summaryRecord, string mappingName)
    Parameters
    Type Name Description
    System.Object summaryRecord
    System.String mappingName

    The corresponding mapping name to print group summary cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridGroupSummaryCell if the AllowPrintStyles is true; otherwise return the PrintGroupSummaryCell.

    Overrides
    PrintManagerBase.GetPrintGroupSummaryCell(Object, String)

    GetPrintHeaderCell(String)

    Returns the header cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintHeaderCell(string mappingName)
    Parameters
    Type Name Description
    System.String mappingName

    The corresponding mapping name to print header cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridHeaderCellControl if the AllowPrintStyles is true; otherwise return the PrintHeaderCell.

    Overrides
    PrintManagerBase.GetPrintHeaderCell(String)

    GetPrintTableSummaryCell(Object, String)

    Returns the table summary cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintTableSummaryCell(object summaryRecord, string mappingName)
    Parameters
    Type Name Description
    System.Object summaryRecord
    System.String mappingName

    The corresponding mapping name to print table summary cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridTableSummaryCell if the AllowPrintStyles is true; otherwise return the PrintTableSummaryCell.

    Overrides
    PrintManagerBase.GetPrintTableSummaryCell(Object, String)

    GetPrintUnboundRowCell(Object, String)

    Returns the UnboundRow cell for the specified record and mapping name for printing.

    Declaration
    public override ContentControl GetPrintUnboundRowCell(object record, string mappingName)
    Parameters
    Type Name Description
    System.Object record

    The corresponding record to print UnboundRow cell.

    System.String mappingName

    The corresponding mapping name to print UnboundRow cell.

    Returns
    Type Description
    System.Windows.Controls.ContentControl

    Returns the GridUnboundRowCell if the AllowPrintStyles is true; otherwise return the PrintUnboundRowCell.

    Overrides
    PrintManagerBase.GetPrintUnboundRowCell(Object, String)

    GetSourceListForPrinting()

    Gets the corresponding data source for printing.

    Declaration
    protected override IList GetSourceListForPrinting()
    Returns
    Type Description
    System.Collections.IList

    Returns the corresponding data source.

    Overrides
    PrintManagerBase.GetSourceListForPrinting()

    InitializeProperties()

    Initializes properties and settings for printing process.

    Declaration
    protected override void InitializeProperties()
    Overrides
    PrintManagerBase.InitializeProperties()

    InitializeStackedHeaderForPage(List<RowInfo>, Int32, Int32, Int32, Int32)

    Initializes the header of specified list of column name to the particular page corresponding to the start and end of the column index.

    Declaration
    protected override void InitializeStackedHeaderForPage(List<RowInfo> rowDictionary, int pageIndex, int startColumnIndex, int endColumnIndex, int start)
    Parameters
    Type Name Description
    System.Collections.Generic.List<RowInfo> rowDictionary

    The rowDictionary to add the header cell info in page.

    System.Int32 pageIndex

    The corresponding index of page to initialize headers.

    System.Int32 startColumnIndex

    The start index of the column to initialize its headers on particular page.

    System.Int32 endColumnIndex

    The end index of the column to initialize its headers on particular page.

    System.Int32 start

    The index for the Stacked Header.

    Overrides
    PrintManagerBase.InitializeStackedHeaderForPage(List<RowInfo>, Int32, Int32, Int32, Int32)

    OnRenderCell(DrawingContext, RowInfo, CellInfo)

    Draws the content of each cell value and its border for the specified drawingContext, row info and cell info to page panel element.

    Declaration
    protected override void OnRenderCell(DrawingContext drawingContext, RowInfo rowInfo, CellInfo cellInfo)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext drawingContext

    The corresponding drawingContext to draw each cell content.

    RowInfo rowInfo

    The corresponding row info to draw each cell content.

    CellInfo cellInfo

    The corresponding cell info to draw each cell content.

    Overrides
    PrintManagerBase.OnRenderCell(DrawingContext, RowInfo, CellInfo)

    OnRenderRow(DrawingContext, RowInfo)

    Draws the content of each row for the specified drawingContext and list of row infos to page panel element.

    Declaration
    protected override void OnRenderRow(DrawingContext drawingContext, RowInfo rowInfoList)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext drawingContext

    The corresponding drawingContext to draw the row info.

    RowInfo rowInfoList
    Overrides
    PrintManagerBase.OnRenderRow(DrawingContext, RowInfo)

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved