This is a migrated thread and some comments may be shown as answers.

Q1 2012 Right Click in RadRichTextBox give unhandled exception OOB

8 Answers 83 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 16 Feb 2012, 11:08 PM
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>

8 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 17 Feb 2012, 06:44 PM
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 >>
0
danparker276
Top achievements
Rank 2
answered on 21 Feb 2012, 09:00 PM
Any ETA on this.  I want to avoid switching back to the last release.
0
Accepted
Iva Toteva
Telerik team
answered on 23 Feb 2012, 11:12 AM
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 >>
0
Edward
Top achievements
Rank 1
answered on 17 May 2012, 04:35 PM
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     

0
Edward
Top achievements
Rank 1
answered on 17 May 2012, 06:58 PM
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;
                
            }
            
        }
0
Edward
Top achievements
Rank 1
answered on 17 May 2012, 07:47 PM
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.
0
danparker276
Top achievements
Rank 2
answered on 17 May 2012, 08:08 PM
I don't have any problems since the fix.  I'm also not using tables in my richtextbox though.
0
Martin Ivanov
Telerik team
answered on 22 May 2012, 09:09 AM
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 >>

Tags
RichTextBox
Asked by
danparker276
Top achievements
Rank 2
Answers by
Martin Ivanov
Telerik team
danparker276
Top achievements
Rank 2
Iva Toteva
Telerik team
Edward
Top achievements
Rank 1
Share this question
or