Need help with adding a header to a new radWindow

4 posts, 0 answers
  1. Jennifer Gasiorowski
    Jennifer Gasiorowski avatar
    2 posts
    Member since:
    Mar 2015

    Posted 23 Feb Link to this post

    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

     

     

     

     

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 24 Feb Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jennifer Gasiorowski
    Jennifer Gasiorowski avatar
    2 posts
    Member since:
    Mar 2015

    Posted 24 Feb in reply to Marin Bratanov Link to this post

    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.

  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 24 Feb Link to this post

    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
Back to Top