Q1 2012 Right Click in RadRichTextBox give unhandled exception OOB

9 posts, 1 answers
  1. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 16 Feb 2012 Link to this post

    I downloaded the new binaries and when I right click on a richtext box it errors on me.  This only happens Out of Browser when I'm debugging.  I get the system null reference.
    I Made a program with no code behind and only a mainpage with the richtextbox.  Code is below.

    <UserControl x:Class="RichText.MainPage"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400">
     
        <Grid x:Name="LayoutRoot" Background="White">
            <StackPanel>
                <TextBox />
            <telerik:RadRichTextBox Name="rrtbDescription" Grid.Row="4" Width="600" Height="200" Margin="0,10,0,0"
                            DataContext="{Binding}"     IsSpellCheckingEnabled="True"
                            BorderThickness="1" BorderBrush="Black" IsSelectionMiniToolBarEnabled="False"
                         IsContextMenuEnabled="True" 
                            
                                         AcceptsTab="False" AcceptsReturn="False"
                            >
     
     
     
            </telerik:RadRichTextBox>
            </StackPanel>
        </Grid>
    </UserControl>
  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 17 Feb 2012 Link to this post

    Hello Dan,

     Thank you for the feedback. We managed to reproduce the problem and it seems that this is an issue with the context menu. We will do our best to investigate the problem and fix it as soon as possible.

    We are sorry for the inconvenience. We have added points to your account for this report. Don't hesitate to contact us if you have other questions.

    Greetings,
    Martin
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 21 Feb 2012 Link to this post

    Any ETA on this.  I want to avoid switching back to the last release.
  5. Answer
    Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 23 Feb 2012 Link to this post

    Hello Dan,

    This problem has been fixed in the development version and the fix will be visible in the next LIB which will be uploaded next Tuesday. The fix will also be included in the service pack coming in the middle of March.  

    Regards,
    Iva Toteva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Edward
    Edward avatar
    83 posts
    Member since:
    Feb 2011

    Posted 17 May 2012 Link to this post

    Still has the same problem in 2012 Q1 SP1, when right click on a table cell.  This is an in browser app.

    When I right click, the context menu show for like 0.2 second then with this error:

    Line: 56
    Error: Unhandled Error in Silverlight Application
    Code: 2531    
    Category: ParserError       
    Message: Failed to assign to property 'System.Windows.Controls.ContentPresenter.Content'.     
    File:      
    Line: 6058     
    Position: 65     

  7. Edward
    Edward avatar
    83 posts
    Member since:
    Feb 2011

    Posted 17 May 2012 Link to this post

    A workaround is to disable the "Insert..." in the context menu.

            static void _noInsertTableMenu_Showing(object sender, Telerik.Windows.Controls.RichTextBoxUI.Menus.ContextMenuEventArgs e)
            {
                            // Get
                var groups = e.ContextMenuGroupCollection;


                foreach (Telerik.Windows.Controls.RichTextBoxUI.Menus.ContextMenuGroup g in groups)
                {
                    if (g.Type == Telerik.Windows.Controls.RichTextBoxUI.Menus.ContextMenuGroupType.TableCommands)
                        g[0].Visibility = System.Windows.Visibility.Collapsed;
                    
                }
                
            }
  8. Edward
    Edward avatar
    83 posts
    Member since:
    Feb 2011

    Posted 17 May 2012 Link to this post

    Just to add, it seems that simply set g[0].Icon = null would fix this issue, without changing the visibility to collapsed.

    Using Vista theme.
  9. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 17 May 2012 Link to this post

    I don't have any problems since the fix.  I'm also not using tables in my richtextbox though.
  10. Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 22 May 2012 Link to this post

    Hi Edward,

    Thank you for your feedback and the possible workaround. Unfortunately we couldn't isolate this problem. 
    In Q1 SP1 2012 the context menu properly opens inside table in both in and out of browser modes. Dan has also confirmed that the issue has been resolved in the latest version.

    Can you give some more details, so that we could look into the issue?

    Greetings,
    Martin
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner