New to Telerik UI for WinFormsStart a free 30-day trial

Represents a basic class for grid printing.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public abstract class BaseGridPrintRenderer : IGridPrintRenderer

Inheritance: objectBaseGridPrintRenderer

Derived Classes: ColumnGroupsViewDefinitionPrintRendererHtmlViewDefinitionPrintRendererTableViewDefinitionPrintRenderer

Implements: IGridPrintRenderer

Constructors

Initializes a new instance of the BaseGridPrintRenderer class.

C#
public BaseGridPrintRenderer(RadGridView grid)
Parameters:gridRadGridView

The grid.

Properties

Gets the associated RadGridView.

C#
public RadGridView GridView { get; }

Gets the view definition type this print style is for.

C#
public abstract Type ViewDefinitionType { get; }
Property Value:

The type of the view definition.

Implements: IGridPrintRenderer.ViewDefinitionType

Methods

Creates a data print cell element.

C#
protected virtual CellPrintElement CreateDataCellPrintElement(GridViewCellInfo cellInfo, RectangleF cellBounds)
Parameters:cellInfoGridViewCellInfo

The actual grid view cell that will be printed.

cellBoundsRectangleF

The bounds definining the print cell element.

Returns:

CellPrintElement

The CellPrintElement to be printed.

Creates a data print cell element.

C#
protected virtual CellPrintElement CreateDataCellPrintElement(GridViewCellInfo cellInfo)
Parameters:cellInfoGridViewCellInfo

The actual grid view cell that will be printed.

Returns:

CellPrintElement

The CellPrintElement to be printed.

Creates a group print cell element.

C#
protected virtual CellPrintElement CreateGroupCellPrintElement(GridViewGroupRowInfo row)
Parameters:rowGridViewGroupRowInfo

The group row that this print cell represents.

Returns:

CellPrintElement

The CellPrintElement to be printed.

Creates a header print cell element.

C#
protected virtual CellPrintElement CreateHeaderCellPrintElement(GridViewColumn column)
Parameters:columnGridViewColumn

The column which header is the cell.

Returns:

CellPrintElement

The CellPrintElement to be printed.

Creates an image print cell element.

C#
protected virtual CellPrintElement CreateImageCellPrintElement(GridViewCellInfo cellInfo)
Parameters:cellInfoGridViewCellInfo

The actual grid cell that holds the image info.

Returns:

CellPrintElement

The CellPrintElement to be printed.

C#
protected virtual CellPrintElement CreateSparklineCellPrintElement(GridViewCellInfo cellInfo, RectangleF cellBounds)
Parameters:cellInfoGridViewCellInfocellBoundsRectangleFReturns:

CellPrintElement

Creates a summary print cell element.

C#
protected virtual CellPrintElement CreateSummaryCellPrintElement(GridViewCellInfo cellInfo)
Parameters:cellInfoGridViewCellInfo

The actual grid view summary cell that will be printed.

Returns:

CellPrintElement

The CellPrintElement to be printed.

C#
protected virtual void DetachSparkElemnt()

Renders a whole page using the settings provided.

C#
public abstract void DrawPage(PrintGridTraverser traverser, Rectangle drawArea, Graphics graphics, GridPrintSettings settings, int pageNumber)
Parameters:traverserPrintGridTraverser

The traverser to iterate the grid with.

drawAreaRectangle

The size of the drawable area.

graphicsGraphics

The graphics used for the drawing.

settingsGridPrintSettings

The print settings used for the drawing.

pageNumberint

The number of the current page.

Implements: IGridPrintRenderer.DrawPage(PrintGridTraverser, Rectangle, Graphics, GridPrintSettings, int)

Gets the cell's desired width

C#
protected virtual SizeF GetCellDesiredSize(GridCellElement cell)
Parameters:cellGridCellElement

An instance of GridCellElement

Returns:

SizeF

Returns the desired cell's with

Gets the height of a given data row taking into account if the grid AutoSizeRows property is true.

C#
protected virtual int GetDataRowHeight(GridViewRowInfo row, TableViewRowLayoutBase rowLayout)
Parameters:rowGridViewRowInfo

The row to be measured.

rowLayoutTableViewRowLayoutBase

The row layout.

Returns:

int

Occurs for hierarchy rows with more than one child views.

C#
protected virtual void OnChildViewPrinting(ChildViewPrintingEventArgs e)
Parameters:eChildViewPrintingEventArgs

The ChildViewPrintingEventArgs

Occurs for each cell that is being printed.

C#
protected virtual void OnPrintCellFormatting(PrintCellFormattingEventArgs e)
Parameters:ePrintCellFormattingEventArgs

The PrintCellFormattingEventArgs

Occurs after a cell is being formatted and painted.

C#
protected virtual void OnPrintCellPaint(PrintCellPaintEventArgs e)
Parameters:ePrintCellPaintEventArgs

The PrintCellPaintEventArgs

Resets the print style for subsequent use.

C#
public abstract void Reset()

Implements: IGridPrintRenderer.Reset()

Events

Fires for hierarchy rows with more than one child views.

C#
public event ChildViewPrintingEventHandler ChildViewPrinting

Fires for each cell that is being printed.

C#
public event PrintCellFormattingEventHandler PrintCellFormatting

Fires after a cell is being formatted and painted.

C#
public event PrintCellPaintEventHandler PrintCellPaint