skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GridPrintStyle

Represents the print style for RadGridView.

Inheritance
System.Object
GridPrintStyle
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll

Syntax

public class GridPrintStyle

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
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

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
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

The ChildViewPrintingEventArgs

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

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.