Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
losing custom CSS when changing resources in WebMonthView /WebScheduleInfo
posted

I have a WebMonthView that i'm applying css classes to each appointment.

like this... app.Style.CssClass += " DONOTOPEN"; where app is an appointment object in an AppointmentsCollection

  protected void ColourAppointments(AppointmentsCollection app1, List<AppointmentObject> app2)

...

foreach (Infragistics.WebUI.WebSchedule.Appointment app in app1)

This works great when the page loads with data or posts back.

The WebMonthView has 3 tabs/active resources I'm handling the ActiveResourceChanging event....

    void WebScheduleInfo1_ActiveResourceChanging(object sender, ActiveResourceChangingEventArgs e)
    {
        if (e.ResourceDataKey != "")
        {
            switch (e.ResourceDataKey)
            {
                case "3":
                    CurrentResourceKey = "1,2";
                    break;
                default:
                    CurrentResourceKey = e.ResourceDataKey;
                    break;
            }
            FilterWebSchedule(null, null); //Refilter with the new resource key set
            ColourAppointments(WebScheduleInfo1.Appointments, CurrentCalendarAppointments);
            ColourAppointments(WebScheduleInfo2.Appointments, CurrentCalendarAppointments);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "appointmenticons", "CreateAppointmentIcons();", true);
            UpdatePanel1.Update();
        }
    }

this applies the CSS to the appointment objects again in ColourAppointments, but the objects aren't getting the CSS classes when i inspect them in the browser

Parents
No Data
Reply
  • 4315
    Offline posted

    Hello.

    Thank you for using our product! I'm working on creating a demo, using your snippet. I'll be grateful if you have the chance to send me one, where I can reproduce the problem. I will update you when I have more details related to your issue. Thank you for the patience!

    Best regards,
    Nikolay Alipiev
    Software Developer

Children