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

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

4 Answers 81 Views
Window
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Feb 2013, 08:45 PM
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?

4 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 28 Feb 2013, 10:44 PM
Hello David,

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

I hope that helps.
0
Princy
Top achievements
Rank 2
answered on 01 Mar 2013, 02:51 AM
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.
0
David
Top achievements
Rank 1
answered on 04 Mar 2013, 01:27 PM
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();
          }
      }








0
Marin Bratanov
Telerik team
answered on 06 Mar 2013, 03:35 PM
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.
Tags
Window
Asked by
David
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Princy
Top achievements
Rank 2
David
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or