Title bar shows pdf file name

5 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 21 Nov 2009 Link to this post

    Hi

    I am showing a pdf file in a window, but I can't persuade the title bar to show
    anything but the pdf filename.  I have set the window Title property with the required text
    declaratively, but I am not getting it to appear. I also tried code behind onLoad event
    RadWindowPDF.Title = "my text" .

    What can be wrong?

    Thanks
    Clive
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Nov 2009 Link to this post

    Hi,

    I found it is working when I tried setting the Title for RaWindow. I am not sure what happens at your end.

    Setting Title from ASPX:
     
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" OnLoad="RadWindowManager1_Load"
            <Windows> 
                <telerik:RadWindow ID="Window1" Title="my grid" NavigateUrl="../../Data/grid.pdf" VisibleOnPageLoad="true"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 

    From code behind:
     
    RadWindowManager1.Windows[0].Title = "Grid"

    Could you provide the code that you used if doesn't helps?

    -Shinu.
  3. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 23 Nov 2009 Link to this post

    HI

    I am getting an error message in Intellisense (and at runtime) : " Property access must assign to the property or use its value"
    applied to the code behind line (VB). Microsoft site helpfully says the solution is to assign a property or use its value (thanks, MS).
    So I am not sure where to go from here.

    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" OnLoad="RadWindowManager1_Load"
        <Windows> 
         <telerik:RadWindow ID="RadWindowPDF"  
            runat="server" CssClass="windowBody"  
            NavigateUrl="~/buying-wine/SWilliams-fineWineInvestment.pdf"  
            OpenerElementID="divPDF" Width="900px"  
            Height="600px"  
            Title="My Text here"  
            Animation="Fade" InitialBehaviors="Resize"  
            Modal="True"
        </telerik:RadWindow> 
        </Windows> 
        </telerik:RadWindowManager> 
     
    Protected Sub RadWindowManager1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadWindowManager1.Load 
            RadWindowManager1.Windows[0].Title = "My text here" 
    End Sub 
     

  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 23 Nov 2009 Link to this post

    Hello Clive,

    The code that Shinu provided is C# while you are using VB.NET where the syntax is different - you should use
    RadWindowManager1.Windows(0).Title = "My Title"
    Another option is to access the RadWindow control directly, e.g.
    RadWindowPDF.Title = "My Title"


    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Clive Hoggar
    Clive Hoggar avatar
    348 posts
    Member since:
    Nov 2008

    Posted 23 Nov 2009 Link to this post

    Thanks Georgi

    That's fine now
    I should have spotted the square brackets, but maybe Intellisense should have suggested that...

    Clive
Back to Top