I'm able to find an appointment from a search box using the following code.
Private Sub FindAppointment()For Each app As Appointment In SalesOrdersSchedule.Appointments
If app.Subject.Contains(searchTextBox.Text) Then
SalesOrdersSchedule.ActiveView.StartDate = app.Start
SalesOrdersSchedule.SchedulerElement.InvalidateMeasure(True)
SchedulerUIHelper.BringAppointmentIntoView(app, SalesOrdersSchedule)
UcSalesOrderLine1.RefNumber = searchTextBox.Text
UcSalesOrderLine1.lblHeader.Text = GridHeaderHTMLBegin & $"Sales Order Items For {app.Summary} ShipDate: {app.Description}" & GridHeaderHTMLEnd
UcSalesOrderLine1.LoadGrid()
Exit For
End If
Next
End Sub
The BringAppointmentIntoView works just fine - but I need the appointment that has been found to change color so the user can find it amongst all of the other appointments showing for that week.
Is there a way I can change the back color or otherwise highlight the appointment and if so, how can I reset it when the user performs a search for another appointment?