Class GridPrintManager
Implements
Inherited Members
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
InitializeProperties()
Initializes properties and settings for printing process.
Declaration
protected override void InitializeProperties()
Overrides
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
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
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 |