Ctrl + K still works when IsReadOnly=True

2 posts, 0 answers
  1. Bruce
    Bruce avatar
    25 posts
    Member since:
    May 2017

    Posted 30 Aug 2017 Link to this post

    this.radRichTextEditor.IsReadOnly = true;

    still allow you to add hyperlink the document body.

  2. Hristo
    Hristo avatar
    1470 posts

    Posted 31 Aug 2017 Link to this post

    Hi Bruce,

    Thank you for writing.

    Indeed the observed behavior is an issue and I have logged it in our feedback portal, here: 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. I have also updated your Telerik points
    The item is already in development and a fix will be made available with our  R3 release scheduled for mid-September.

    Until the release please handle the CommandExecuting event and cancel it if the control is read-only and the command is ShowInsertHyperlinkDialogCommand
    public partial class Form1 : Form
        public Form1()
            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;

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top