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

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

1 Answer 32 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
towpse
Top achievements
Rank 2
towpse asked on 04 Dec 2009, 09:25 PM
    <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 %>

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Dec 2009, 01:34 PM
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.
Tags
Scheduler
Asked by
towpse
Top achievements
Rank 2
Answers by
Peter
Telerik team
Share this question
or