Table Row Issues in RichTextBox

6 posts, 1 answers
  1. Nachiket
    Nachiket avatar
    15 posts
    Member since:
    Jul 2012

    Posted 28 Nov 2012 Link to this post

    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 ...
  2. Nachiket
    Nachiket avatar
    15 posts
    Member since:
    Jul 2012

    Posted 28 Nov 2012 Link to this post

    BTW it took me 4 attempts to post this thread !!! :(
    and The post wont accept my XAML code 
  3. DevCraft banner
  4. Nachiket
    Nachiket avatar
    15 posts
    Member since:
    Jul 2012

    Posted 28 Nov 2012 Link to this post

    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
  5. Answer
    Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 30 Nov 2012 Link to this post

    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.

  6. Nachiket
    Nachiket avatar
    15 posts
    Member since:
    Jul 2012

    Posted 30 Nov 2012 Link to this post

    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
  7. Martin Ivanov
    Admin
    Martin Ivanov avatar
    104 posts

    Posted 05 Dec 2012 Link to this post

    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.

Back to Top
DevCraft banner