Is there a no-code method to open a RadWindow?

5 posts, 0 answers
  1. David
    David avatar
    12 posts
    Member since:
    Sep 2012

    Posted 28 Feb 2013 Link to this post

    One of the things I like about the RadToolTip is its extremely simple to work with. No code is required, all it takes is setting a the TargetControlID and a few other properties:

    <telerik:RadToolTip ID="StudentLastNameRadToolTip" TargetControlID="FullNameLabel" RelativeTo="Element" runat="server" HideEvent="ManualClose" ShowEvent="OnClick" Modal="True" ShowDelay="0">

    Is there an equivalent way of using the RadWindow?
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 28 Feb 2013 Link to this post

    Hello David,

    The RadWindow has an OpenerElementID that you can set to the control that will open the RadWindow.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Feb 2013 Link to this post

    Hello David,

    Yes, RadWindow can be opened without using any code. Using the OpenerElementID property of the RadWindow, you can set which control is responsible for opening the RadWindow. Please have a look at the following mark up.

    ASPX:
    <telerik:RadWindow ID="RadWindow1" runat="server" Width="300px" Height="300px" OpenerElementID="RadButton1">
        <ContentTemplate>
            <asp:Label ID="Label1" runat="server" Text="RadWindow Opened"></asp:Label>
        </ContentTemplate>
    </telerik:RadWindow>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Open Window">
    </telerik:RadButton>

    Thanks,
    Princy.
  5. David
    David avatar
    12 posts
    Member since:
    Sep 2012

    Posted 04 Mar 2013 Link to this post

    I need to create multiple user controls each with a RadGrid that has a RadWindow that acts as an edit dialog. Then I need to create a web page that contains more than one of these usercontrols.

    What changes do I need to make to the demo http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window in order to achieve this?

    The part that is throwing me off is I can not implement the AjaxRequest because I can only have one RadAjaxManager which is in the MasterPage. The RadAjaxManagerProxy does not support AjaxRequest.


    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
          {
              if (e.Argument == "Rebind")
              {
                  RadGrid1.MasterTableView.SortExpressions.Clear();
                  RadGrid1.MasterTableView.GroupByExpressions.Clear();
                  RadGrid1.Rebind();
              }
              else if (e.Argument == "RebindAndNavigate")
              {
                  RadGrid1.MasterTableView.SortExpressions.Clear();
                  RadGrid1.MasterTableView.GroupByExpressions.Clear();
                  RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;
                  RadGrid1.Rebind();
              }
          }








  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 06 Mar 2013 Link to this post

    Hello David,

    The following help article explains how you can subscribe to the manager's events in the content page: http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html.

    If you need to have mulpiple instance on the same page I would advise avoiding the RadWIndowManager and using standalone RadWindows so they can work strictly with their own user control. The following resources can be helpful for this:
    http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-wrong-window-opened.html - on handling several managers on the page
    http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html - on the ways to open a RadWindow
    http://www.telerik.com/support/kb/aspnet-ajax/general/using-dynamic-unique-names-for-javascript-functions.aspx - on creating unique names for the JavaScript functions so they don't override each other if several instances are present on the page.


    All the best,
    Marin Bratanov
    the Telerik team
    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 their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017