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

[Solved] Title bar shows pdf file name

4 Answers 219 Views
Window
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 21 Nov 2009, 05:20 PM
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

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Nov 2009, 10:42 AM
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.
0
Clive Hoggar
Top achievements
Rank 1
answered on 23 Nov 2009, 12:16 PM
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 
 

0
Georgi Tunev
Telerik team
answered on 23 Nov 2009, 01:19 PM
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.
0
Clive Hoggar
Top achievements
Rank 1
answered on 23 Nov 2009, 02:50 PM
Thanks Georgi

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

Clive
Tags
Window
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Clive Hoggar
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or