I want to prevent right click to the area of behind an existing appointment in the Infragistics.Win.UltraWinSchedule.UltraDayView.
How can i achieve this?
Hello Murat,
Thank you for posting to our forum.
In order to achieve it, you can use the MouseDown event and cancel it (e.Cancel=True)
Please let me know if you need further assistance.
Hello Divya,
I don't want to completeley disable right click on the dayview. There is a little area behind an appointment (such as selected red squared area in the picture) which user can right click, I want to disable this area, not the whole dayview. I fixed the problem by querying if there is an appointment in that selected time span, but I would like to know if there is a more efficient way.
Thank you
Thank you for the update.
Please let me know if you need further assistance on this matter.
This is my vb.net code. I think it's ok, thank you for your kind support.
Dim startDateTime As DateTime = IIf(Me.DayView.SelectedTimeSlotRange.StartDateTime.Year < 1901, DateTime.Now, Me.DayView.SelectedTimeSlotRange.StartDateTime) Dim endDateTime As DateTime = IIf(Me.DayView.SelectedTimeSlotRange.EndDateTime.Year < 1901, DateTime.Now.AddHours(1), Me.DayView.SelectedTimeSlotRange.EndDateTime) If Not IsNothing(dsData) AndAlso dsData.Tables(0).Rows.Count > 0 Then If dsData.Tables(0).Select(String.Format("VenueID={0} AND StartTime<'{2}' AND EndTime>'{1}'", Me.DayView.ActiveOwner.Key, startDateTime, endDateTime)).Count > 0 Then Exit Sub End If End If
Murat,
That approach should be fine if it meets your needs. As far as finding a more efficient way, I wouldn't be too concerned about performance in this scenario as long as the UI seems responsive to the end user. If you would like us to review your approach to see if we have suggestions for improvements, please provide the relevant code.
Let us know if we may be of further assistance.