How to use DayPilot Scheduler in SharePoint 2010 ?

Asked by mehul@kcspl.co.in
13 years ago.

I want to integrate DayPilot Scheduler in my SharePoint application through which i have to develop an employee scheduler(Attached here with employeescheduler.png).

I have made a Visual webpart and added a reference of DayPilot.dll .But when i tried to add the created web part into SharePoint application it gives security exception(Attached here with errorscreen.png).

Can anyone help me to sort it out ? Or if anyone can guide me for How to use DayPilot Scheduler in SharePoint 2010 ?

Answer posted by Dan Letecky [DayPilot]
13 years ago.

Version 7.3.2844 doesn't call Assembly.GetName() (which requires IO permissions) anymore.

You can download it in the sandbox:

http://www.daypilot.org/sandbox/

Comment posted by mehul@kcspl.co.in
13 years ago.

Thanks Dan , It works. :)

But how can i modify the data source or how can i integrate my own data since DayPilotPro demo source provides its own xml and inbuilt data source.

Thanks in Advance.

Comment posted by Dan Letecky [DayPilot]
13 years ago.

You can supply a collection of custom objects to the DataSource property. You just need to map the object properties using Data*Field properties (e.g. DataStartField, DataEndField).

It will accept DataTable, ArrayList, etc.

See also the tutorials at http://code.daypilot.org for more complex examples (most of them use a simple DataTable loaded directly from a database).

Comment posted by Dan Letecky [DayPilot]
13 years ago.

An example of filling DayPilotScheduler.Resources can be found in the restaurant table/seat reservation tutorial:

http://code.daypilot.org/34704/restaurant-table-reservation-tutorial-asp-net-c-vb-net

private void LoadResources()
{
  DataTable locations = new DataManager().GetLocations();
  DayPilotScheduler1.Resources.Clear();
  foreach (DataRow location in locations.Rows)
  {
    int id = Convert.ToInt32(location["LocationId"]);

    Resource r = new Resource((string)location["LocationName"], null); // using null for resources that can't be used
    r.IsParent = true; // marking as parent for the case that no children are loaded
    r.Expanded = true;
    DayPilotScheduler1.Resources.Add(r);

    DataTable rooms = new DataManager().GetLocations(id, Filter.Seats);
    
    foreach (DataRow dr in rooms.Rows)
    {
      Resource c = new Resource((string)dr["LocationName"], Convert.ToString(dr["LocationId"]));
      r.Children.Add(c);
    }
  }
}
Comment posted by Anonymous
13 years ago.

Hello Dan,

I got the Region wise resource list , but unable to bind the event against each resources.

Can you please help me ?

Thanks

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