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

Need help with adding a header to a new radWindow

3 Answers 178 Views
Window
This is a migrated thread and some comments may be shown as answers.
JenMaryland
Top achievements
Rank 1
JenMaryland asked on 23 Feb 2016, 09:34 PM

I'm creating a user control that adds a new window to the RadWindowManager. I'm trying to add a header to the window, which seems easy enough in the demo code, but I'm getting an error that says "'header' is not a member of 'Telerik.Web.UI.RadWindow'.". I'm new to jquery and Ajax controls, so I don't know if I'm missing something.

(Telerik version is 2014.3.1024.45)

ascx file -

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadWindowManager RenderMode="Auto" ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="True" runat="server" EnableShadow="true" EnableViewState="False">
  <Shortcuts>
    <telerik:WindowShortcut CommandName="RestoreAll" Shortcut="Alt+F3"></telerik:WindowShortcut>
    <telerik:WindowShortcut CommandName="Tile" Shortcut="Alt+F6"></telerik:WindowShortcut>
    <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc"></telerik:WindowShortcut>
  </Shortcuts>
</telerik:RadWindowManager>

Code Behind -

Public Sub ShowModalDialog(ID As String, URL As String)
 
  Dim newWindow As New RadWindow()
  'NavigateUrl to be chosen dynamically.
  newWindow.ID = ID
  newWindow.NavigateUrl = URL
  newWindow.VisibleOnPageLoad = True
  newWindow.OnClientClose = "OnClientClose"
  newWindow.Modal = True
 
  newWindow.header = "Test"
 
 
  newWindow.Shortcuts.Add(NewWindowShortcut("Maximize", "Ctrl+F2"))
  newWindow.Shortcuts.Add(NewWindowShortcut("Restore", "Ctrl+F3"))
  newWindow.Shortcuts.Add(NewWindowShortcut("Minimize", "Ctrl+F8"))
 
  RegisterControl(ID)
  ModalWindow.Windows.Add(newWindow)
 
End Sub

 

 

 

 

 

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 24 Feb 2016, 09:29 AM

Hello Jennifer,

RadWindow for ASP.NET AJAX does not have a Header property, just like the compiler errors out. Could you point me to the AJAX demo you use as base because I am not aware of such a resource that we provide? To create a header you would need to create it in your own content (either in the ContentTemplate, or in the content page), and optionally hide the built-in titlebar by setting the VisibleTitlebar property to false.

On a side note, to open a RadWindow from the server, I advise you register a script as shown in the documentation: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/opening-from-the-server. There are multiple ways to open a dialog and I also advise you review the following article to see them all and choose the one that will fit your needs best: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/getting-started/opening-windows.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
JenMaryland
Top achievements
Rank 1
answered on 24 Feb 2016, 01:44 PM

I was looking at this page - http://docs.telerik.com/devtools/wpf/controls/radwindow/features/window-header

VB.NET
Dim radWindow As New RadWindow()
radWindow.Header = "My RadWindow"

That's what I was trying to do.

0
Marin Bratanov
Telerik team
answered on 24 Feb 2016, 02:19 PM

Hi Jennifer,

The article you linked is for the UI for WPF suite and is not applicable for the UI for ASP.NET AJAX suite.

With RadWindow for ASP.NET AJAX you need to define the desired layout in the content you provide, there is no Header property or header template.

RadDock offers a header template, however, so you may want to see whether it fits your requirements: http://demos.telerik.com/aspnet-ajax/dock/examples/edittitle/defaultcs.aspx. Note that it is not designed for arbitrary content and the more content you put there, the more likely it is that the control will appear broken.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
JenMaryland
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
JenMaryland
Top achievements
Rank 1
Share this question
or