how do i toggle the advanced form title when doing web services bindign based on form mode?

2 posts, 0 answers
  1. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 04 Dec 2009 Link to this post

        <div class="rsAdvTitle"
            <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%> 
            <h1 class="rsAdvInnerTitle"
                <%= Owner.Localization.AdvancedEditAppointment %></h1
        </div> 

    I see by default it's always using the edit appointment.
    And I see this happening before the populate method in the form created method

                              var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;

    There should be a way to check for mode in the script line  <%= Owner.Localization.AdvancedEditAppointment %>

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Dec 2009 Link to this post

    Hi towps,

    You can accomplish what you are after by modifying the AdvancedForm as follows:

    * * *
    <h1 class="rsAdvInnerTitle"><asp:Label ID="TitleLabel" runat="server"></asp:Label> </h1>
    * * *

    protected void Page_Load(object sender, EventArgs e)
            {
                if (mode == AdvancedFormMode.Edit)
                    TitleLabel.Text = Owner.Localization.AdvancedEditAppointment;
                else if (mode == AdvancedFormMode.Insert)
                    TitleLabel.Text = Owner.Localization.AdvancedNewAppointment;


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top