Multi-Line Title?

Thread is closed for posting
4 posts, 0 answers
  1. Dean
    Dean avatar
    12 posts
    Member since:
    Feb 2008

    Posted 25 Mar 2009 Link to this post

    Using the latest version of the controls.

    Is there a way to create a multi-line title?

    I've tried the following in the chart.PreRender event, but have not had success:

    RadChart1.ChartTitle.TextBlock.Text = "Line1 " & System.Environment.NewLine & "Line2" 
    and
    RadChart1.ChartTitle.TextBlock.Text = "Line1  Line2" 
    and
    RadChart1.ChartTitle.TextBlock.Text = "Line1 <br/> Line2" 
  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 26 Mar 2009 Link to this post

    Hello Dean,

    The first line of code you have provided is valid and works fine for me. Just one note -- can you confirm it is used in PreRender event handler and not in PrePaint? The PrePaint event is fired when the chart layout calculation has been already completed. That is -- the chart title size is calculated according to its current content, so changing it at this point will not be reflected. So you might experience this issue with PrePaint, but it should be fine in PreRender.

    Best regards,
    Ves
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip
    Philip avatar
    70 posts
    Member since:
    Apr 2008

    Posted 26 Aug 2013 Link to this post

    I seem to be having the same issue using the line below does absolutely nothing. It simply ignores the System.Environment.Newline
    It is a straight cut and paste from the code above.

    I have tried everything I can possibly find, and it simply ignores any attempt to return the line. 

    Should it really be this difficult to just add a sub title????





     Protected Sub RadChart1_PreRender(sender As Object, e As System.EventArgs) Handles RadChart1.PreRender


            RadChart1.ChartTitle.TextBlock.Text = "Line1 " & System.Environment.NewLine & "Line2"
        End Sub
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 29 Aug 2013 Link to this post

    Hi Philip,

    It seems to work correctly on our end. Please, find attached a simple example along with the result. Can you provide us with with an example reproducing the problem? Thanks.

    Best regards,
    Ves
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top