I want to display more event data along with name, start, end... in DayPilot Pro Calendar
Let say I've two more fields in datasource [Description and location], now I want to show it with other details in calendar events
How can I achieve this. I need your help.
Thanks!
Shahnawaz Khan
-
4/26/2007 1:27:50 PM
I've described it in a new documentation chapter:
Custom event rendering.
Basically, you should use BeforeEventRender event to modify the event InnerHTML property. You only have to decide how to pass the location and description information into the BeforeEventRender.
Probably the best way is to load all the events into a DataSource/DataTable including a primary key definition and then use DataTable1.Rows.Find(e.Value) to find the right row and read the necessary fields. That DataTable can be assigned to DayPilotCalendar1.DataSource so you load all the data from a database at once.
Thank You! for your kind support.
I'm able to display more eventdata now.
You are doing well, keep it up!
Shahnawaz Khan
-
4/27/2007 7:33:39 AM
In
DayPilot Pro 3.9, it's now possible to pass multiple custom fields (not just a single field stored in DataTagField) with the event.
1. Enter your fields into DataTagFields property, separated by comma:
DataTagFields="description, location"
2. Access the fields in BeforeEventRender event handler using BeforeEventHandlerEventArgs.Tag collection:
e.InnerHTML = e.Name + " (" + e.Tag["location"] + ", " + e.Tag["description"] + ")";