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

RadWindow inside Ajax Panel

1 Answer 53 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Pauli
Top achievements
Rank 1
Pauli asked on 14 Oct 2008, 03:52 PM
Hello....

I have a a login page which works as follows:

When the user clicks on the login button, the system verifies the username and password and upon successful login, a new radWindow is called.
In this radWindow, the user gets has to select additional options related to his login, for example timeout session.
However on clicking the "Cancel" button, all fields and errors are cleared, without any page reload (Ajax needed here)


I am getting problems to call javascript functions to load the radWindow once I add a radAjax panel onto the page.
I tried the different solutions found in your forum, but still none of them worked.

<telerik:RadAjaxPanel ID="RadAjaxPanelLogin" runat="server" EnableEmbeddedScripts="true" EnableOutsideScripts="true" >
</telerik:RadAjaxPanel>


I even created the radWindow dynamically(C#), but it is no more displayed once ajax is enabled..
[The generation of the radWindow doesn't necessarily be done at run time.]

    private void OpenRadWindow()
    {
        RadWindow newWindow = new RadWindow();
        newWindow.NavigateUrl = Constants.PAGE_CONNEXION_TYPE;
        newWindow.Title = AppConstants.ConnectionChooseType;
        newWindow.Modal = true;
        newWindow.Width = Unit.Pixel(390);
        newWindow.Height = Unit.Pixel(315);
        newWindow.Behaviors = Telerik.Web.UI.WindowBehaviors.None;

        newWindow.Visible = true;
        newWindow.VisibleOnPageLoad = true;
        form1.Controls.Add(newWindow);
    }

I even tried to call a javascript function to open a radWindow, but again on enabling ajax on the form, nothing appears.
string scriptString = @"<script type='text/javascript'>OpenRadWindowJS();</script>";
LiteralControl script = new LiteralControl(scriptString);
RadAjaxPanelLogin.Controls.Add(script);

In brief, by setting the  EnableAJAX="False" on the RadAjaxPanel, everything works, except that the page is no more ajaxed
<telerik:RadAjaxPanel ID="RadAjaxPanelLogin" runat="server" EnableAJAX="False" EnableEmbeddedScripts="true" EnableOutsideScripts="true" >


Could you please provide an example of something done similarly ?
Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 17 Oct 2008, 08:18 AM
Hi Yashvin,

Will it be convenient for you to open a regular support ticket and send us sample runnable project which replicates the described behaviour? Having your exact application will be very helpful to isolate the problem you are facing and provide accurate solution for your particular scenario.

Thank you for your cooperation.

Best wishes,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Pauli
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or