Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
    HTML Tag Support
   [Collapse]Examples
    [Expand]UI Customization
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Expand]Document Elements
    [Expand]Layout
    [Expand]Automation
     Spell Check
    [Expand]Export
    [Expand]Printing
    [Collapse]Protection
      How to: Create Protected Ranges in Code
      How to: Create Protected Ranges in a Document
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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

How to: Create Protected Ranges in a Document

This document provides a step-by-step guide to applying editing restrictions to document ranges using the WinForms Rich Text Editor Ribbon UI.

  1. Make sure the document is unprotected. Disable protections with the Unprotect Document button - in Ribbon UI mode, available from the Review ribbon tab.

  2. Select a range.
  3. Click the Range Editing Permissions button to invoke the Editing Permissions Dialog. In Ribbon UI mode, the Range Editing Permissions button is in the Review ribbon tab.

  4. In the Editing Permissions dialog, check users and groups with edit permissions in the range. These permissions are enforced when the document is protected. Click OK to apply your changes and close the dialog window.

  5. Click the Protect Document button - available from the Review ribbon tab in the Ribbon UI - to enable document protection.

  6. The Start Enforcing Protection dialog will prompt you for a password. Provide and confirm a document protection password. Click OK to close the dialog.

  7. Save the document as a DOCX file.
  8. To enable editing in the range when opening the document in a RichEditControl, set the DXRichEditAuthenticationOptions.UserName property to an allowed user, or the RangePermission.Group property to an allowed group. You assigned the users and groups with range edit permissions in step 4, from the Editing Permissions dialog.
  9. Load the document from step 7.
  10. Edit the range. With document protection enabled, ranges without edit permission are read-only.

Is this topic helpful?​​​​​​​