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

Table Row Issues in RichTextBox

5 Answers 96 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Nachiket
Top achievements
Rank 1
Nachiket asked on 28 Nov 2012, 10:41 PM
Hi,
I came across this strange issue and after lot of trials and errors I think I was able to find out the recipe to produce this error. Here it goes,
I have a RichTextBox --> It has 3 Tables
Whenever I hover over the Header of Any Table it shows me the MOVE box near the Table Header(Table Header is just the first row in my case which is style differently) .. I am just stating this because I think there is an issue here.

Setup: Here is the structure of the RichTextBox XAML
Table1 : Rows including header row ==43
Paragraph
Table2 : Rows including header row ==36
Paragraph
Table3 : Rows including header row ==3

Problem:
If the Table 1 has even 1 more row than 43, and you hover over the header row of Table 2 Ot Table 3 the application blows up throwing Index out of Range . Must be non-negative and less than the size of the collection error. I have attached the error screenshot

Similarly If the Table 2 has 1 more record than 43 rows and I hover over Table 3 then application blows.
Important thing to consider was 43 was the row count that would fill up 1 page height, after 43 rows the 44th row spills over to the next page.

XAML 


its really strange problem. Please help ...

5 Answers, 1 is accepted

Sort by
0
Nachiket
Top achievements
Rank 1
answered on 28 Nov 2012, 10:42 PM
BTW it took me 4 attempts to post this thread !!! :(
and The post wont accept my XAML code 
0
Nachiket
Top achievements
Rank 1
answered on 28 Nov 2012, 11:12 PM
This is the XAML for my RichTextBox 

<telerik:RadRichTextBox  x:Name="richText" Grid.Row="0" AllowScaling="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsContextMenuEnabled="False" IsReadOnly="True" IsSelectionMiniToolBarEnabled="False" IsSpellCheckingEnabled="False" />

This was the XAML thats being loaded into the control
This wont let me add the code block of XAML, here is the link 
<<Link removed by Telerik Admin for violation of copyright policy.>>

Here is the Solution which demonstrates the issue
<<Link removed by Telerik Admin for violation of copyright policy.>>
You will have to Open the Rad documetn XAML as XML file in the Open file dialog
0
Accepted
Martin Ivanov
Telerik team
answered on 30 Nov 2012, 04:54 PM
Hello Nachiket,

Thank you for the feedback. This problem is already known and it has been fixed in 2012 Q2 SP1.

Please upgrade to a newer version (your version seems to be 2012 Q2) and the issue should be resolved.

All the best,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Nachiket
Top achievements
Rank 1
answered on 30 Nov 2012, 05:05 PM
Thank you very much Martin.

Just being curious, can you please tell me what the problem was. Was it around the event handler Table Header which ends up displaying the MOVE icon next to the table header. I just want to know if my hunch was right. 

Thank You,
Nachiket
0
Martin Ivanov
Telerik team
answered on 05 Dec 2012, 12:39 PM
Hello Nachiket,
The problem was related to the table adorner implementation issue. 

Also we have to mention that you can simply disable this layer:
public MainPage()
{
    InitializeComponent();
    this.editor.UILayersBuilder = new CustomUILayerBuilder();
}
   
class CustomUILayerBuilder : UILayersBuilder
{
    protected override void BuildUILayersOverride(IUILayerContainer uiLayerContainer)
    {
        base.BuildUILayersOverride(uiLayerContainer);
        uiLayerContainer.UILayers.Remove(DefaultUILayers.TableMovementLayer);
    }
}
if you don't need it.



All the best,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Nachiket
Top achievements
Rank 1
Answers by
Nachiket
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or