ClassGridPrintStyle
Represents the print style for RadGridView.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
[TypeConverter(typeof(ExpandableObjectConverter))]
public class GridPrintStyle
Inheritance: objectGridPrintStyle
Constructors
GridPrintStyle()
Initializes a new instance of the GridPrintStyle class.
Declaration
public GridPrintStyle()
GridPrintStyle(RadGridView)
Initializes a new instance of the GridPrintStyle class.
Declaration
public GridPrintStyle(RadGridView grid)
Parameters
grid
The grid.
Properties
AlternatingRowColor
Gets or sets a value indidcating the alternating row color for odd rows.
BorderColor
Gets or sets the default color of all borders.
CellBackColor
Gets or sets the default back color for data cells.
CellFont
Gets or sets the font that will be used for the data cells.
CellPadding
Gets or sets the default padding for all cells.
ChildViewPrintMode
Gets or sets a value indicating how child views are printed when printing a hierarchical grid.
Declaration
public ChildViewPrintMode ChildViewPrintMode { get; set; }
Property Value
FitWidthMode
Gets or sets a value indicating how the columns will be printed.
Declaration
public PrintFitWidthMode FitWidthMode { get; set; }
Property Value
GridView
Gets the RadGridView that this print styles is assigned to.
GroupRowBackColor
Gets or sets the default back color of group rows.
GroupRowFont
Gets or sets the font that will be used for the group cells.
HeaderCellBackColor
Gets or sets the default back color of header cells.
HeaderCellFont
Gets or sets the font that will be used for the header cells.
HierarchyIndent
Gets or sets a indent in pixels when printing a hierarchicle grid.
PrintAllPages
Gets or sets a value indicating whether all pages will be printed when paging is enabled.
Declaration
public bool PrintAllPages { get; set; }
Property Value
true if all pages will be printed; otherwise, false.
PrintAlternatingRowColor
Gets or sets a value indicating whether alternating row color is printed.
Declaration
public bool PrintAlternatingRowColor { get; set; }
Property Value
PrintGrouping
Gets or sets a value indicating whether grouing will be printed.
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.
PrintHiddenColumns
Gets or sets a value indicating whether hidden columns will be printed.
PrintHiddenRows
Gets or sets a value indicating whether hidden rows will be printed.
PrintHierarchy
Gets or sets a value indicating whether hierarchy will be printed.
PrintRenderer
Gets or sets the print renderer that is used for print rendering.
Declaration
public BaseGridPrintRenderer PrintRenderer { get; set; }
Property Value
PrintSummaries
Gets or sets a value indicating whether summary rows will be printed.
PrintTraverser
Gets the traverser that is used to traverse the RadGridView
Declaration
public PrintGridTraverser PrintTraverser { get; }
Property Value
SummaryCellBackColor
Gets or sets the default back color of summary cells.
SummaryCellFont
Gets or sets the font that will be used for the summary cells.
Methods
DrawPage(Rectangle, Graphics, int)
Draws a whole document page.
GetNumberOfPages(Rectangle)
Gets the number of pages needed for drawing the associated RadGridView.
Initialize()
Initializes the default values for the style.
Declaration
public virtual void Initialize()
InitializePrintRenderer(RadGridView)
Initializes the correct print renderer for the current grid view definition
Declaration
protected virtual BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
Parameters
grid
The grid that is being printed.
Returns
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
protected virtual void OnChildViewPrinting(object sender, ChildViewPrintingEventArgs e)
Parameters
sender
The initiator of the event.
e
OnPrintCellFormatting(object, PrintCellFormattingEventArgs)
Fires when the content of a print cell needs to be formatted for print.
Declaration
[Browsable(true)]
protected virtual void OnPrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
Parameters
sender
The initiator of the event.
e
The event arguments.
OnPrintCellPaint(object, PrintCellPaintEventArgs)
Fires when the content of a print cell is painted, allows custom painting.
Declaration
[Browsable(true)]
protected virtual void OnPrintCellPaint(object sender, PrintCellPaintEventArgs e)
Parameters
sender
The initiator of the event.
e
The event arguments.
Reset()
Resets the print style for subsequent use.
Declaration
public virtual void Reset()
UnwirePrintRendererEvents()
Declaration
protected virtual void UnwirePrintRendererEvents()
WirePrintRendererEvents()
Declaration
protected virtual void WirePrintRendererEvents()
Events
ChildViewPrinting
Fires for hierarchy rows with more than one child views.
Declaration
public event ChildViewPrintingEventHandler ChildViewPrinting
Event Value
PrintCellFormatting
Fires when the content of a print cell needs to be formatted for print.
Declaration
public event PrintCellFormattingEventHandler PrintCellFormatting
Event Value
PrintCellPaint
Fires when the content of a print cell is painted, allows custom painting.
Declaration
public event PrintCellPaintEventHandler PrintCellPaint
Event Value