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
  [Collapse]Rich Text Editor
    Overview
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
     Text Formatting
     Import and Export
     Mail Merge
     Restrictions and Protection
     Line Numbering
     Table of Contents
     Check Spelling
     AutoCorrect
     Printing
     Syntax Highlighting
     Traversing the Document
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [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]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]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Line Numbering

Click Line Numbering Options to invoke the Line Numbers Dialog.

To switch line numbering On, specify the SectionLineNumbering.CountBy property to any non-zero positive integer value. Other parameters can be set up as illustrated below.

Note

The RichEditView.AllowDisplayLineNumbers enables you to show or hide line numbers in a view.

Show Me

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

The following code snippet enables line numbering for the first section in the loaded document using the Section.LineNumbering property. Line numbering starts at number one and restarts at the new section. Numbers are displayed on each second line and are indented from the text at a distance equal to 75 documents (0.25 of an inch).

Line numberings are allowed to display in SimpleView and DraftView. To make line numbers visible, the left padding should be increased to 60 points.

Font face and color are specified using the Line Number document style.

Expanded See Also

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