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

RadAjaxManager with RadWindow doesn't ajax controls in window

6 Answers 248 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Joshua Kent
Top achievements
Rank 2
Joshua Kent asked on 22 Feb 2011, 02:10 AM
I have been battling a problem recently with RadAjaxManager.

I have a RadButton that opens a RadWindow using AJAX (calls a postback that set's VisibleOnPageLoad=true). But any button in the window that was open won't make it's postback through ajax. Instead it makes the request through a normal postback. If I set the RadButton to do a normal postback (not setup an ajaxsetting for it) then the buttons in the RadWindow work.

Any ideas on what I am doing wrong? I have tried searching the form and google to find a solutions and can't find anyone else that is having the same problem.

I have included the parts of code that are related to the problem (i hope)... thanks in advance.

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" IsSticky="true" style="position:absolute; top:0; left:0; height:100; width;">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="AjaxManager" runat="server" 
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnAddTeachingActivity">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="windowExistingActivity"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="radioExisitingActivity">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="windowExistingActivity" />
                    <telerik:AjaxUpdatedControl ControlID="windowAddTeachingActivity" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
     
    </telerik:RadAjaxManager>
 
<telerik:RadButton ID="btnAddTeachingActivity" runat="server" Text="Add Teaching Activity" OnClick="btnAddTeachingActivity_Click">
            <Icon PrimaryIconUrl="template/Icons/add.png" />
        </telerik:RadButton>
 
 
<telerik:RadWindow ID="windowExistingActivity"  runat="server" IconUrl="template/icons/add.png" Title="Add New Teaching Activity" Behaviors="Close, Move" Modal="true" VisibleStatusbar="false" AutoSize="false" Width="500px" Height="200px" >
        <ContentTemplate>
            <div class="roundGrayBox" style="width: 435px; margin-left: 10px; margin-right: 10px; margin-top: 15px;">
                <asp:Panel ID="pnlExisitingActivityQuestion" runat="server">
                    <h2>Have you entered this teaching activity into the system previously?</h2>
                    <asp:RadioButtonList ID="radioExisitingActivity" runat="server" AutoPostBack="true" OnSelectedIndexChanged="radioExisitingActivity_SelectedIndexChanged">
                        <asp:ListItem Text="Yes" />
                        <asp:ListItem Text="No" />
                    </asp:RadioButtonList>             
                </asp:Panel>
 
                <asp:Panel ID="pnlExisitingActivitySelection" runat="server" Visible="false">
                    <h2>Select Exisiting Activity</h2>
                    <table width="100%">
                        <tr>
                            <td>Academic Year:</td>
                            <td>
                                <telerik:RadComboBox ID="ddlExisitingActivityYear" runat="server" Width="150px">
                                </telerik:RadComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td>Activitiy:</td>
                            <td>
                                <telerik:RadComboBox ID="ddlExisitingActivities" runat="server" Width="100%">
                                </telerik:RadComboBox>
                            </td>
                        </tr>
                    </table>
                    <telerik:RadButton ID="btnExisitingActivity" runat="server" Text="Start With Exisiting Activity" />
                </asp:Panel>
            </div>
        </ContentTemplate>
    </telerik:RadWindow>

protected void btnAddTeachingActivity_Click(object sender, EventArgs e)
        {
            windowExistingActivity.VisibleOnPageLoad = true;
        }
  
protected void radioExisitingActivity_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (radioExisitingActivity.SelectedValue == "Yes")
            {
                windowExistingActivity.VisibleOnPageLoad = true;
                pnlExisitingActivitySelection.Visible = true;
                pnlExisitingActivityQuestion.Visible = false;
            }
            else
            {
                hiddenTeachingActivityId.Value = "";
                windowAddTeachingActivity.Title = "Add Teaching Activity";
                windowAddTeachingActivity.IconUrl = "template/icons/add.png";
                windowAddTeachingActivity.VisibleOnPageLoad = true;
  
                txtContactHours.Value = null;
                txtNumberOfLeaners.Value = null;
                txtTitle.Text = "";
                ddlAcademicYear.SelectedIndex = 0;
                ddlLearners.ClearSelection();
                ddlLocation.SelectedIndex = 0;
                ddlSemester.SelectedIndex = 0;
                ddlStrategy.SelectedIndex = 0;
            }

6 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 24 Feb 2011, 02:32 PM
Hi Joshua,

Please review the answer provided in the official support ticket you have opened. If any further questions arise please continue the communication in the official support ticket for better tracking the issue.


Best wishes,
Maria Ilieva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Paulo
Top achievements
Rank 1
answered on 31 Mar 2011, 07:38 PM
I have the same problem. What is the solution?
0
Maria Ilieva
Telerik team
answered on 01 Apr 2011, 04:08 PM
Hi Paulo,

In the Joshua's case I suggested to try to add the RadWindow into always visible asp Panel and add that Panel into the RadAjaxSetting instead of adding the window itself. Also note that it is not correct to set inner for the RadWindow controls to update its parent Window. So I would also suggest instead of the last Ajax settings to add a setting in which the mentioned asp Panel updates itself.



Greetings,
Maria Ilieva
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Merritt
Top achievements
Rank 1
answered on 08 Mar 2012, 08:40 PM
This doesn't work for me and is written in such as way that certain things are ambiguous; for instance: the inner of the RadWindow? Where is the answer to the offical support ticket and can't I get an updated opionion on this issue because it is vital to my current way of using RadWindow.
0
Maria Ilieva
Telerik team
answered on 13 Mar 2012, 02:32 PM
Hi ,

By this : " Also note that it is not correct to set inner for the RadWindow controls to update its parent Window", I meant that controls added in RadWindow ContentTemplate for example could not be set as ajax initiator to update their own parent RadWindow. The problem in the case that was discussed here was that invisible control was added in the RadAjaxManager settings which is not a supported scenario, therefore usage of always visible container was suggested.
If your case is not the same and you are still facing issue in using RadWindow with RadAjax  I would suggest you to open a regular support ticket and describe your exact scenario there. Therefore we will be able to better track the problem and do our best to provide proper solution.

All the best,
Maria Ilieva
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.
0
Merritt
Top achievements
Rank 1
answered on 14 Mar 2012, 05:04 AM
Thank you for taking the time to reply, but I have already worked out a viable solution to using the RadWindow in the scenarios I was hoping to. Basically I just put a placeholder in the window and dynamically load controls into it. The issue was getting the window to show up using code behind so i just registered a startup script during the async postback even handlers to show it (and size it). I use the RadAjaxManager to hook up any buttons/grids or anything that I want to use to async the loading of the placeholder. It can be quirky (if I use more than one window and try to recreate the placeholder strategy: for instance a radwindow on a master and on individual pages), but is working well enough.
Tags
Ajax
Asked by
Joshua Kent
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Paulo
Top achievements
Rank 1
Merritt
Top achievements
Rank 1
Share this question
or