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
890
UltraTimeLineView Some Settings
posted

I am looking for a few settings for the Timeline.

1. How do I turn off the ability to edit the appointment from the timeline.  When I click on the appointment I can edit the information but I only want to edit from my own form that I made.

2.  When I double click an appointment I have a form pop up, but when I double click the scrollbar it tries to open an appointment even though I am not on an appointment. Right now I am just using a Try Catch to eliminate this problem but is there a property I can set?

3.  Timeline shows me all the appointments for an owner for the date and time, I am trying to make it easy for someone to see if there is an appointment scheduled.  If there is at least 1 appointment scheduled I would like the grid cells themselves to be black without having the appointment bar.  So the whole cell would be black if there is an appointment, or white if no appointment.

4. I still cannot find out how to set the working hours.  Could you provide an example on how to tell it 9-5.

5. Right now when the timeline loads it loads with the correct date showing but I want it to scroll to the current time as well. Any way to do this?

6. I also forgot to ask how I refresh the timeline to show my updated information from the database. I tried a few things and nothing refreshed.  What is the proper way to reload the information from the database to the timelineview?

Thanks, I know this is a new control and I am trying to find my way around.

  • 69832
    Verified Answer
    Offline posted

    1. Handle the AppointmentEnteringEditMode event, and cancel it. This will prevent "in-place" editing, but not the automatic displaying of the appointment dialog, which brings us to #2...

    2. It sounds like you are handling DoubleClick or MouseDoubleClick; what you might want to consider instead is handing the UltraTimelineView.CalendarInfo.BeforeDisplayAppointmentDialog event, cancel it, and use that as a trigger to display your custom dialog. This event was actually designed specifically for this purpose.

    3. This would take a bit of manual coding. The Owner class exposes properties (see DayOfWeekSettings, DateSettings) that enable you to color time slots arbitrarily, and also redefine the working hours for that owner. The help topic here explains how it works, and also has code samples.

    4. The link I included in #3 has a code sample for this.

    5. By default, it scrolls to midnight of the current day. You can use the EnsureDateTimeVisible method to scroll it to the current time, using DateTime.Now. Since DateTime.Now might return, for example, 9:17AM, you might want to round that off so that the first visible slot is aligned exactly.

    6. Assuming you are using the intrinsic data binding , you should be able to call UltraTimelineView.CalendarInfo.AppointmentsDataBinding.RefreshData()