Class
GridPrintStyle

Represents the print style for RadGridView.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(ExpandableObjectConverter))]
public class GridPrintStyle

Inheritance: objectGridPrintStyle

Constructors

GridPrintStyle()

Initializes a new instance of the GridPrintStyle class.

Declaration

cs-api-definition
public GridPrintStyle()

GridPrintStyle(RadGridView)

Initializes a new instance of the GridPrintStyle class.

Declaration

cs-api-definition
public GridPrintStyle(RadGridView grid)

Parameters

grid

RadGridView

The grid.

Properties

AlternatingRowColor

Gets or sets a value indidcating the alternating row color for odd rows.

Declaration

cs-api-definition
public Color AlternatingRowColor { get; set; }

Property Value

Color

BorderColor

Gets or sets the default color of all borders.

Declaration

cs-api-definition
public Color BorderColor { get; set; }

Property Value

Color

CellBackColor

Gets or sets the default back color for data cells.

Declaration

cs-api-definition
public Color CellBackColor { get; set; }

Property Value

Color

CellFont

Gets or sets the font that will be used for the data cells.

Declaration

cs-api-definition
public Font CellFont { get; set; }

Property Value

Font

CellPadding

Gets or sets the default padding for all cells.

Declaration

cs-api-definition
public Padding CellPadding { get; set; }

Property Value

Padding

ChildViewPrintMode

Gets or sets a value indicating how child views are printed when printing a hierarchical grid.

Declaration

cs-api-definition
public ChildViewPrintMode ChildViewPrintMode { get; set; }

Property Value

ChildViewPrintMode

FitWidthMode

Gets or sets a value indicating how the columns will be printed.

Declaration

cs-api-definition
public PrintFitWidthMode FitWidthMode { get; set; }

Property Value

PrintFitWidthMode

GridView

Gets the RadGridView that this print styles is assigned to.

Declaration

cs-api-definition
public RadGridView GridView { get; }

Property Value

RadGridView

GroupRowBackColor

Gets or sets the default back color of group rows.

Declaration

cs-api-definition
public Color GroupRowBackColor { get; set; }

Property Value

Color

GroupRowFont

Gets or sets the font that will be used for the group cells.

Declaration

cs-api-definition
public Font GroupRowFont { get; set; }

Property Value

Font

HeaderCellBackColor

Gets or sets the default back color of header cells.

Declaration

cs-api-definition
public Color HeaderCellBackColor { get; set; }

Property Value

Color

HeaderCellFont

Gets or sets the font that will be used for the header cells.

Declaration

cs-api-definition
public Font HeaderCellFont { get; set; }

Property Value

Font

HierarchyIndent

Gets or sets a indent in pixels when printing a hierarchicle grid.

Declaration

cs-api-definition
public int HierarchyIndent { get; set; }

Property Value

int

PrintAllPages

Gets or sets a value indicating whether all pages will be printed when paging is enabled.

Declaration

cs-api-definition
public bool PrintAllPages { get; set; }

Property Value

bool

true if all pages will be printed; otherwise, false.

PrintAlternatingRowColor

Gets or sets a value indicating whether alternating row color is printed.

Declaration

cs-api-definition
public bool PrintAlternatingRowColor { get; set; }

Property Value

bool

PrintGrouping

Gets or sets a value indicating whether grouing will be printed.

Declaration

cs-api-definition
public bool PrintGrouping { get; set; }

Property Value

bool

PrintHeaderOnEachPage

Gets or sets a value indicating whether header cells will be printed on each page. This setting does not work when printing a hierarchical grid.

Declaration

cs-api-definition
public bool PrintHeaderOnEachPage { get; set; }

Property Value

bool

PrintHiddenColumns

Gets or sets a value indicating whether hidden columns will be printed.

Declaration

cs-api-definition
public bool PrintHiddenColumns { get; set; }

Property Value

bool

PrintHiddenRows

Gets or sets a value indicating whether hidden rows will be printed.

Declaration

cs-api-definition
public bool PrintHiddenRows { get; set; }

Property Value

bool

PrintHierarchy

Gets or sets a value indicating whether hierarchy will be printed.

Declaration

cs-api-definition
public bool PrintHierarchy { get; set; }

Property Value

bool

PrintRenderer

Gets or sets the print renderer that is used for print rendering.

Declaration

cs-api-definition
public BaseGridPrintRenderer PrintRenderer { get; set; }

Property Value

BaseGridPrintRenderer

PrintSummaries

Gets or sets a value indicating whether summary rows will be printed.

Declaration

cs-api-definition
public bool PrintSummaries { get; set; }

Property Value

bool

PrintTraverser

Gets the traverser that is used to traverse the RadGridView

Declaration

cs-api-definition
public PrintGridTraverser PrintTraverser { get; }

Property Value

PrintGridTraverser

SummaryCellBackColor

Gets or sets the default back color of summary cells.

Declaration

cs-api-definition
public Color SummaryCellBackColor { get; set; }

Property Value

Color

SummaryCellFont

Gets or sets the font that will be used for the summary cells.

Declaration

cs-api-definition
public Font SummaryCellFont { get; set; }

Property Value

Font

Methods

DrawPage(Rectangle, Graphics, int)

Draws a whole document page.

Declaration

cs-api-definition
public virtual void DrawPage(Rectangle drawArea, Graphics graphics, int pageNumber)

Parameters

drawArea

Rectangle

The available drawing area.

graphics

Graphics

The Graphics used for the drawing.

pageNumber

int

The number of the page that is being drawn.

GetNumberOfPages(Rectangle)

Gets the number of pages needed for drawing the associated RadGridView.

Declaration

cs-api-definition
public virtual int GetNumberOfPages(Rectangle drawArea)

Parameters

drawArea

Rectangle

The available drawing area.

Returns

int

The number of needed pages.

Initialize()

Initializes the default values for the style.

Declaration

cs-api-definition
public virtual void Initialize()

InitializePrintRenderer(RadGridView)

Initializes the correct print renderer for the current grid view definition

Declaration

cs-api-definition
protected virtual BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)

Parameters

grid

RadGridView

The grid that is being printed.

Returns

BaseGridPrintRenderer

An instance of the correct print renderer for the given grid view.

OnChildViewPrinting(object, ChildViewPrintingEventArgs)

Occurs for hierarchy rows with more than one child views.

Declaration

cs-api-definition
protected virtual void OnChildViewPrinting(object sender, ChildViewPrintingEventArgs e)

Parameters

sender

object

The initiator of the event.

e

ChildViewPrintingEventArgs

The ChildViewPrintingEventArgs

OnPrintCellFormatting(object, PrintCellFormattingEventArgs)

Fires when the content of a print cell needs to be formatted for print.

Declaration

cs-api-definition
[Browsable(true)]
protected virtual void OnPrintCellFormatting(object sender, PrintCellFormattingEventArgs e)

Parameters

sender

object

The initiator of the event.

e

PrintCellFormattingEventArgs

The event arguments.

OnPrintCellPaint(object, PrintCellPaintEventArgs)

Fires when the content of a print cell is painted, allows custom painting.

Declaration

cs-api-definition
[Browsable(true)]
protected virtual void OnPrintCellPaint(object sender, PrintCellPaintEventArgs e)

Parameters

sender

object

The initiator of the event.

e

PrintCellPaintEventArgs

The event arguments.

Reset()

Resets the print style for subsequent use.

Declaration

cs-api-definition
public virtual void Reset()

UnwirePrintRendererEvents()

Declaration

cs-api-definition
protected virtual void UnwirePrintRendererEvents()

WirePrintRendererEvents()

Declaration

cs-api-definition
protected virtual void WirePrintRendererEvents()

Events

ChildViewPrinting

Fires for hierarchy rows with more than one child views.

Declaration

cs-api-definition
public event ChildViewPrintingEventHandler ChildViewPrinting

Event Value

ChildViewPrintingEventHandler

PrintCellFormatting

Fires when the content of a print cell needs to be formatted for print.

Declaration

cs-api-definition
public event PrintCellFormattingEventHandler PrintCellFormatting

Event Value

PrintCellFormattingEventHandler

PrintCellPaint

Fires when the content of a print cell is painted, allows custom painting.

Declaration

cs-api-definition
public event PrintCellPaintEventHandler PrintCellPaint

Event Value

PrintCellPaintEventHandler