RichTextBox in Grid Cell with Spelling suggestions

3 posts, 0 answers
  1. Duane
    Duane avatar
    5 posts
    Member since:
    Apr 2011

    Posted 12 May 2011 Link to this post

    I have a couple of problems while evaluating the Telerik Silverlight controls

    I was hoping I could just have a simple text box control in a GridView with spell checking, but it looks like I need to use the RadRichTextbox control. The users will be entering text, no text formatting is necessary. So, I don't want to display any formatting menus.

    So, here are the problems:
    1) The starting font size is too large.  How can I set the default font size?
    2) I have the dictionary, so only misspelled words are underlined, but Suggested words do not show up when I click the misspelled word.  How can I get the suggested word to show up?

  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 18 May 2011 Link to this post

    Hello Duane,
    Have you checked out RadSpellChecker? It can be used on GridView cells, as well as DataGrid cells. The suggestions for the misspelled words are shown in an additional pop-up that enables you to choose one of the suggestions or add the word to the dictionary.
    As for your RadRichTextBox questions:
         0.   In case you don't want to show the SelectionMiniToolBar, you can set the property                                              IsSelectionMiniToolBarEnabled to False.
    1. The default font size can be set in the following way:
      <telerik:RadRichTextBox FontSize="12" DocumentInheritsDefaultStyleSettings="True" />
    2. You can also set these properties in code-behind. In that case, you can make use of the Unit class, which provides methods for conversion between different measurement units - PointToDip, DipToPoint, etc.
    3. The suggestions for misspelled words are normally shown in the context menu on right click. In order to use the ContextMenu, IsContextMenuEnabled should be true (default value is true) and you need to include references to the following assemblies:
      1. Telerik.Windows.Controls;
      2. Telerik.Windows.Controls.Input;
      3. Telerik.Windows.Controls.Navigation;
      4. Telerik.Windows.Controls.RadRibbonBar;
      5. Telerik.Windows.Controls.RichTextBoxUI.
    You can read more about the customization of the context menu in our online documentation. Most probably, you would need to remove the Font and Paragraph items from the context menu, as they provide means for rich text formatting.
    You can also disable the default key bindings for bold, italics, underlines, opening the font properties dialog, etc, by assigning empty commands to the KeyBindings in the following way:
    <telerik:RadRichTextBox Name="rrtb0" Grid.Row="1" >
                <!-- bold -->
                <telerik:KeyBinding Gesture="Ctrl+Shift+B" />
                <telerik:KeyBinding Gesture="Ctrl+B" />
                <!-- underline -->
                <telerik:KeyBinding Gesture="Ctrl+U" />
                <!-- italics -->
                <telerik:KeyBinding Gesture="Ctrl+I" />
                <!-- font properties dialog -->
                <telerik:KeyBinding Gesture="Ctrl+D" />              
                <!-- insert hyperlink dialog -->
                <telerik:KeyBinding Gesture="Ctrl+K" />
                <!-- paragraph align left -->
                <telerik:KeyBinding Gesture="Ctrl+L" />
                <!-- paragraph align right -->
                <telerik:KeyBinding Gesture="Ctrl+R" />
                <!-- paragraph align center -->
                <telerik:KeyBinding Gesture="Ctrl+E" />
                <!-- paragraph align justify -->
                <telerik:KeyBinding Gesture="Ctrl+J" />
                <!-- find replace dialog -->
                <telerik:KeyBinding Gesture="Ctrl+F" />

    I hope this answers your questions.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Duane
    Duane avatar
    5 posts
    Member since:
    Apr 2011

    Posted 24 May 2011 Link to this post

    Hi Iva,

    Thanks a lot for your response...I'm now moving toward the RadSpellCheck solution in the RadGridView and it works beautifully!!!

    Thanks again!
Back to Top