Custom Appointment Label on the Calendar

Hello,

I am currently loving the ScheduleControl. I have scoured the documentations and knowledge base but it lacks detailed information.

Anyways, I want to change the label of the appointments displayed on the calendar.



Currently, it is using the Subject field. Is it possible to change it? I want to replace it with a custom field.

Thanks

3 Replies

FB Felix Bagur December 7, 2017 04:38 PM UTC

Hi!, 

Basically you have to subscribe the event

AddHandler Me.ParseDisplayItem, AddressOf schedule_ParseDisplayItem

....
And then override the formatted text property with your custom label

Private Sub schedule_ParseDisplayItem(sender As Object, e As ParseDisplayItemEventArgs)
            e.FormattedText = e.Item.StartTime.Hour & ":" & IIf(CStr(e.Item.StartTime.Minute).Length = 1, "0", "") & e.Item.StartTime.Minute & " -> " & e.Item.Subject
            'Handled must be true to change the formatted text. 
            e.Handled = True
End Sub





MA manoyanx December 8, 2017 03:08 AM UTC

Hi Felix,

Its working now!


Thanks


AR Arulpriya Ramalingam Syncfusion Team December 8, 2017 06:43 AM UTC

Hi Renegene, 
 
Thanks for contacting Syncfusion support. 
 
As in the previous update, the ParseDisplayItem event can be used to set the DisplayText of appointments. The Label of appointments can be changed by setting the custom string to FormattedText property. 
 
Please let us know if you have any other queries. 
 
Regards, 
Arulpriya  


Loader.
Up arrow icon