Class GridPrintStyle
Represents the print style for RadGridView.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridPrintStyle
Constructors
GridPrintStyle()
GridPrintStyle(RadGridView)
Initializes a new instance of the GridPrintStyle class.
Declaration
public GridPrintStyle(RadGridView grid)
Parameters
|
RadGridView
grid
The grid. |
Properties
AlternatingRowColor
Gets or sets a value indidcating the alternating row color for odd rows.
Declaration
public Color AlternatingRowColor { get; set; }
Property Value
|
System.Drawing.Color
|
BorderColor
Gets or sets the default color of all borders.
Declaration
public Color BorderColor { get; set; }
Property Value
|
System.Drawing.Color
|
CellBackColor
Gets or sets the default back color for data cells.
Declaration
public Color CellBackColor { get; set; }
Property Value
|
System.Drawing.Color
|
CellFont
Gets or sets the font that will be used for the data cells.
Declaration
public Font CellFont { get; set; }
Property Value
|
System.Drawing.Font
|
CellPadding
Gets or sets the default padding for all cells.
Declaration
public Padding CellPadding { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
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
|
ChildViewPrintMode
|
FitWidthMode
Gets or sets a value indicating how the columns will be printed.
Declaration
public PrintFitWidthMode FitWidthMode { get; set; }
Property Value
|
PrintFitWidthMode
|
GridView
Gets the RadGridView that this print styles is assigned to.
Declaration
public RadGridView GridView { get; }
Property Value
|
RadGridView
|
GroupRowBackColor
Gets or sets the default back color of group rows.
Declaration
public Color GroupRowBackColor { get; set; }
Property Value
|
System.Drawing.Color
|
GroupRowFont
Gets or sets the font that will be used for the group cells.
Declaration
public Font GroupRowFont { get; set; }
Property Value
|
System.Drawing.Font
|
HeaderCellBackColor
Gets or sets the default back color of header cells.
Declaration
public Color HeaderCellBackColor { get; set; }
Property Value
|
System.Drawing.Color
|
HeaderCellFont
Gets or sets the font that will be used for the header cells.
Declaration
public Font HeaderCellFont { get; set; }
Property Value
|
System.Drawing.Font
|
HierarchyIndent
Gets or sets a indent in pixels when printing a hierarchicle grid.
Declaration
public int HierarchyIndent { get; set; }
Property Value
|
System.Int32
|
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
|
System.Boolean
|
PrintAlternatingRowColor
Gets or sets a value indicating whether alternating row color is printed.
Declaration
public bool PrintAlternatingRowColor { get; set; }
Property Value
|
System.Boolean
|
PrintGrouping
Gets or sets a value indicating whether grouing will be printed.
Declaration
public bool PrintGrouping { get; set; }
Property Value
|
System.Boolean
|
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
public bool PrintHeaderOnEachPage { get; set; }
Property Value
|
System.Boolean
|
PrintHiddenColumns
Gets or sets a value indicating whether hidden columns will be printed.
Declaration
public bool PrintHiddenColumns { get; set; }
Property Value
|
System.Boolean
|
PrintHiddenRows
Gets or sets a value indicating whether hidden rows will be printed.
Declaration
public bool PrintHiddenRows { get; set; }
Property Value
|
System.Boolean
|
PrintHierarchy
Gets or sets a value indicating whether hierarchy will be printed.
Declaration
public bool PrintHierarchy { get; set; }
Property Value
|
System.Boolean
|
PrintRenderer
Gets or sets the print renderer that is used for print rendering.
Declaration
public BaseGridPrintRenderer PrintRenderer { get; set; }
Property Value
|
BaseGridPrintRenderer
|
PrintSummaries
Gets or sets a value indicating whether summary rows will be printed.
Declaration
public bool PrintSummaries { get; set; }
Property Value
|
System.Boolean
|
PrintTraverser
Gets the traverser that is used to traverse the RadGridView
Declaration
public PrintGridTraverser PrintTraverser { get; }
Property Value
|
PrintGridTraverser
|
SummaryCellBackColor
Gets or sets the default back color of summary cells.
Declaration
public Color SummaryCellBackColor { get; set; }
Property Value
|
System.Drawing.Color
|
SummaryCellFont
Gets or sets the font that will be used for the summary cells.
Declaration
public Font SummaryCellFont { get; set; }
Property Value
|
System.Drawing.Font
|
Methods
DrawPage(Rectangle, Graphics, Int32)
Draws a whole document page.
Declaration
public virtual void DrawPage(Rectangle drawArea, Graphics graphics, int pageNumber)
Parameters
|
System.Drawing.Rectangle
drawArea
The available drawing area. |
|
System.Drawing.Graphics
graphics
The System.Drawing.Graphics used for the drawing. |
|
System.Int32
pageNumber
The number of the page that is being drawn. |
GetNumberOfPages(Rectangle)
Gets the number of pages needed for drawing the associated RadGridView.
Declaration
public virtual int GetNumberOfPages(Rectangle drawArea)
Parameters
|
System.Drawing.Rectangle
drawArea
The available drawing area. |
Returns
|
System.Int32
The number of needed pages. |
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
|
RadGridView
grid
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
protected virtual void OnChildViewPrinting(object sender, ChildViewPrintingEventArgs e)
Parameters
|
System.Object
sender
The initiator of the event. |
| ChildViewPrintingEventArgs e |
OnPrintCellFormatting(Object, PrintCellFormattingEventArgs)
Fires when the content of a print cell needs to be formatted for print.
Declaration
protected virtual void OnPrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
Parameters
|
System.Object
sender
The initiator of the event. |
|
PrintCellFormattingEventArgs
e
The event arguments. |
OnPrintCellPaint(Object, PrintCellPaintEventArgs)
Fires when the content of a print cell is painted, allows custom painting.
Declaration
protected virtual void OnPrintCellPaint(object sender, PrintCellPaintEventArgs e)
Parameters
|
System.Object
sender
The initiator of the event. |
|
PrintCellPaintEventArgs
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 Type
|
ChildViewPrintingEventHandler
|
PrintCellFormatting
Fires when the content of a print cell needs to be formatted for print.
Declaration
public event PrintCellFormattingEventHandler PrintCellFormatting
Event Type
|
PrintCellFormattingEventHandler
|
PrintCellPaint
Fires when the content of a print cell is painted, allows custom painting.
Declaration
public event PrintCellPaintEventHandler PrintCellPaint
Event Type
|
PrintCellPaintEventHandler
|