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
209
WebSceduleInfo Refresh
posted

Hi,

On refresh on the ScheduleInfo I use Infragistics.WebUI.WebSchedule.Appointment object to fill the appointments in the DayView, and for every refresh I have changes in the appointments. When these changes are in the Subject, Start or End Date, everything it's OK. But when I try to change the background-color of the appointment, it doesn't work for every appointment. Some appointments change it's background color, but some of them don't take their new color or take the color of the existing appointment.

To set color I use the following properties:

appointment.Style.BackColor 

appointment.Style.ForeColor

The property Style doesn't work properly every time, I put the name of the colors in the Subject and it's displayed the right color, but it's doesn't color the background.

 

My second problem is with the processing image. When I Refresh or navigate SceduleInfo the processing image is displayed in the right bottom corner, but I didn't change anycode to do that. I like to be in the center like it was before.

Thanks,

Iva 

  • 142
    posted

    Try to use CustomRules like this:

     Protected Sub WebScheduleInfo_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) 'Handles WebScheduleInfo1.DataBinding

            Dim indexTabN As String
            Dim infoOnTabN As WebScheduleInfo

            For index As Integer = 1 To Me.UltraWebTab1.Tabs.Count

                indexTabN = index.ToString
                infoOnTabN = CType(Me.UltraWebTab1.Tabs.GetTab(index - 1).ContentPane.FindControl("WebScheduleInfo" & indexTabN), WebScheduleInfo)

                For Each appt As Appointment In WebScheduleInfo1.Appointments

                    Select Case appt.Importance
                        Case Importance.High
                            'appt.Style.BackColor = Drawing.Color.Red ' Doesn't work
                            appt.Style.CustomRules = "color: red;"
                            appt.Style.CustomRules = "background-color:lightyellow;"
                        Case Importance.Low
                            appt.Style.CustomRules = "background-color:lightblue;"
                        Case Importance.Normal
                            appt.Style.CustomRules = "background-color:lightgreen;"
                    End Select

                Next
            Next

        End Sub