Completed
Last Updated: 01 Sep 2017 06:51 by ADMIN
ADMIN
Hristo
Created on: 31 Aug 2017 13:25
Category: RichTextEditor
Type: Bug Report
1
FIX. RadRichTextEditor - the InsertHyperlinkDialog can still be opened using the Ctrl + K key shortcut even when the control has its IsReadOnly property set to true
How to reproduce: set the RadRichTextEditor.IsReadOnly property to true, focus the control, use the Ctrl + K shortcut. The InsertHyperlinkDialog will be opened.

Workaround: handle the CommandExecuting event
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        this.radRichTextEditor1.IsReadOnly = true;
        this.radRichTextEditor1.CommandExecuting += RadRichTextEditor1_CommandExecuting;
    }

    private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
    {
        if (this.radRichTextEditor1.IsReadOnly && e.Command is ShowInsertHyperlinkDialogCommand)
        {
            e.Cancel = true;
        }
    }
}

0 comments