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

Represents the print style for RadGridView.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public class GridPrintStyle

Inheritance: objectGridPrintStyle

Constructors

Initializes a new instance of the GridPrintStyle class.

C#
public GridPrintStyle()

Initializes a new instance of the GridPrintStyle class.

C#
public GridPrintStyle(RadGridView grid)
Parameters:gridRadGridView

The grid.

Properties

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

C#
public Color AlternatingRowColor { get; set; }

Gets or sets the default color of all borders.

C#
public Color BorderColor { get; set; }

Gets or sets the default back color for data cells.

C#
public Color CellBackColor { get; set; }

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

C#
public Font CellFont { get; set; }

Gets or sets the default padding for all cells.

C#
public Padding CellPadding { get; set; }

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

C#
public ChildViewPrintMode ChildViewPrintMode { get; set; }

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

C#
public PrintFitWidthMode FitWidthMode { get; set; }

Gets the RadGridView that this print styles is assigned to.

C#
public RadGridView GridView { get; }

Gets or sets the default back color of group rows.

C#
public Color GroupRowBackColor { get; set; }

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

C#
public Font GroupRowFont { get; set; }

Gets or sets the default back color of header cells.

C#
public Color HeaderCellBackColor { get; set; }

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

C#
public Font HeaderCellFont { get; set; }

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

C#
public int HierarchyIndent { get; set; }

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

C#
public bool PrintAllPages { get; set; }
Property Value:

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

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

C#
public bool PrintAlternatingRowColor { get; set; }

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

C#
public bool PrintGrouping { get; set; }

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.

C#
public bool PrintHeaderOnEachPage { get; set; }

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

C#
public bool PrintHiddenColumns { get; set; }

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

C#
public bool PrintHiddenRows { get; set; }

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

C#
public bool PrintHierarchy { get; set; }

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

C#
public BaseGridPrintRenderer PrintRenderer { get; set; }

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

C#
public bool PrintSummaries { get; set; }

Gets the traverser that is used to traverse the RadGridView

C#
public PrintGridTraverser PrintTraverser { get; }

Gets or sets the default back color of summary cells.

C#
public Color SummaryCellBackColor { get; set; }

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

C#
public Font SummaryCellFont { get; set; }

Methods

Draws a whole document page.

C#
public virtual void DrawPage(Rectangle drawArea, Graphics graphics, int pageNumber)
Parameters:drawAreaRectangle

The available drawing area.

graphicsGraphics

The Graphics used for the drawing.

pageNumberint

The number of the page that is being drawn.

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

C#
public virtual int GetNumberOfPages(Rectangle drawArea)
Parameters:drawAreaRectangle

The available drawing area.

Returns:

int

The number of needed pages.

Initializes the default values for the style.

C#
public virtual void Initialize()

Initializes the correct print renderer for the current grid view definition

C#
protected virtual BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid)
Parameters:gridRadGridView

The grid that is being printed.

Returns:

BaseGridPrintRenderer

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

Occurs for hierarchy rows with more than one child views.

C#
protected virtual void OnChildViewPrinting(object sender, ChildViewPrintingEventArgs e)
Parameters:senderobject

The initiator of the event.

eChildViewPrintingEventArgs

The ChildViewPrintingEventArgs

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

C#
[Browsable(true)]
protected virtual void OnPrintCellFormatting(object sender, PrintCellFormattingEventArgs e)
Parameters:senderobject

The initiator of the event.

ePrintCellFormattingEventArgs

The event arguments.

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

C#
[Browsable(true)]
protected virtual void OnPrintCellPaint(object sender, PrintCellPaintEventArgs e)
Parameters:senderobject

The initiator of the event.

ePrintCellPaintEventArgs

The event arguments.

Resets the print style for subsequent use.

C#
public virtual void Reset()
C#
protected virtual void UnwirePrintRendererEvents()
C#
protected virtual void WirePrintRendererEvents()

Events

Fires for hierarchy rows with more than one child views.

C#
public event ChildViewPrintingEventHandler ChildViewPrinting

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

C#
public event PrintCellFormattingEventHandler PrintCellFormatting

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

C#
public event PrintCellPaintEventHandler PrintCellPaint