Welcome Guest Search | Active Topics | Sign In | Register

Bind Data to Calendar from Database Options
jensweb
Posted: Thursday, November 13, 2008 1:20:21 PM
Rank: Newbie
Groups: Member

Joined: 11/13/2008
Posts: 1
I would like to know if it is possible to bind data from an existing database to the calendar. I want know if I can pull events already in the database into the calendar widget, before I purchase your product.

Thanks,
Jennifer
Jen's Web Design
eo_support
Posted: Thursday, November 13, 2008 1:38:11 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Certainly. I am assuming you are asking something like this:

http://www.essentialobjects.com/Demo/Default.aspx?path=Calendar\_i1\scheduler

The process is usually done by two steps:

1. Pull the data from your database and store it in memory. Usually in a Hashtable or a Dictionary object, where the key is a Date and the value is whatever other information you have on that date. With this information, you will be able to tell On date X you have event Y;

2. Handle the calendar's DayRender event. DayRender event is called for every day cell in the Calendar. So for example, if the Calendar is currently showing Nov, 2008, then it calls your DayRender event handler for 11/01/2008, 11/02/2008..., till 11/30/2008. You will then decide what you want to put inside each cell by checking the information you gathered on step 1. For example, you can simply display an "X" for a day that has an event, and display the regular day number for a day that does not have an event;

The key for this approach is, you can put whatever HTML code inside each cell depending on your own logic. The Calendar provides the outer table, header, scroll buttons and organize the row and cells for you, while you fill the cells based on your own data, logic and designs.

Hope this helps. Please feel free to let us know if you wanted something else.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.