Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Collapse]Printing-Exporting
   [Expand]Product Information
   [Collapse]Getting Started
     Lesson 1 - Show the Print Preview for a Link
     Lesson 2 - Draw Simple Text
     Lesson 3 - Draw Formatted Text
     Lesson 4 - Draw Formatted/Colored Text
     Lesson 5 - Insert Two Bricks
     Lesson 6 - Insert Two Rows
     Lesson 7 - Insert Two Rows and Three Columns
     Lesson 8 - Insert Three Rows and Three Columns
     Lesson 9 - Create a Multi-Page Document
   [Expand]Fundamental Concepts
   [Expand]Concepts
   [Expand]Examples
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Lesson 7 - Insert Two Rows and Three Columns

The link created in this lesson generates a document that contains two rows and three columns, with an image brick added to the second row.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E161.

To insert two rows and three columns into the content of a printing link, do the following.

  1. To create a new printing link, declare a new class (Lesson7) derived from the Lesson6 class defined in the previous lesson. The new class implements a new constructor with two parameters: one specifying a printing system, and one specifying an image to print within the report. Make sure to add an image to the project (called fish.bmp).

    The CreateRow method is also enhanced to add an empty brick, and then insert an image brick inside it.

  2. To add the image to the project's resources, right-click the application title in the Solution Explorer and select Properties.

    Switch to Resources, and select Add Existing File... in the Add Resource drop-down menu.

    Click Save to apply the changes.

  3. Next, modify the main form's Load event handler to pass the Printing System of the Document Viewer and the image to the new link.

Launch the application and view the result.

Expanded See Also

How would you rate this topic?​​​​​​​