Keep AdvancedForm open on update.

2 posts, 0 answers
  1. Gustaf
    Gustaf avatar
    2 posts
    Member since:
    Aug 2011

    Posted 03 Nov 2014 Link to this post

    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>
  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 06 Nov 2014 Link to this post

    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.

Back to Top