search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Display more event data

Asked by Shahnawaz Khan
15 years ago.

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.


Comment posted by Dan Letecky
15 years ago.
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.
Comment posted by Shahnawaz Khan
15 years ago.

Thank You! for your kind support.

I'm able to display more eventdata now.

You are doing well, keep it up!

Comment posted by Dan Letecky
14 years ago.
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"] + ")";
Comment posted by krishnan
9 years ago.

i would like to store some more data for a event that should not be displayed .. how is it possible ..
please help

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.