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

Keep AdvancedForm open on update.

1 Answer 52 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Developer asked on 03 Nov 2014, 10:01 AM
My client's wishes that when they press save/update button in AdvanceForm it should not shut down the dialog.
Instead, they want a text to be shown that the item is saved. 

Is this possible when using AdvancedForm?

<asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">
            <div class="rsAdvButtonWrapper">
                <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">
                    <span><%= Owner.Localization.Save %></span>
                <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel"
                    <span><%= Owner.Localization.Cancel %></span>

1 Answer, 1 is accepted

Sort by
Hristo Valyavicharski
Telerik team
answered on 06 Nov 2014, 10:02 AM
Hi Dick,

If you want to persist the changes then you will have to close the advanced form and then show it explicitly:

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    <script type="text/javascript">
        function openForm() {
            var scheduler = $find("<%= RadScheduler1.ClientID %>");
            var appD = $get("hiddenField").value;
            var app = scheduler.get_appointments().findByID(appD);
    <asp:HiddenField runat="server" ID="hiddenField" />
    <telerik:RadScheduler ID="RadScheduler1" runat="server" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate">

protected override void OnInit(EventArgs e)
    RadScheduler1.Provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), true);
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
    ScriptManager.RegisterStartupScript(Page, GetType(), "formScript", "Sys.Application.add_load(openForm);", true);
    hiddenField.Value = e.Appointment.ID.ToString();

Other thing you may try is to display this Panel in RadWindow after the appointment is updated.

Hristo Valyavicharski

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question