This is a migrated thread and some comments may be shown as answers.

Getting Resource ID on Dropping a Data Row in to Scheduler

1 Answer 68 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dasun
Top achievements
Rank 1
Dasun asked on 04 Aug 2010, 06:55 AM
I'm trying something similar scheduler and datagrid drag and drop example. However I would like know how I can get the resource ID when you drop the data row in to the scheduler, just like the way I can get the time slot index.

Please help.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Aug 2010, 10:59 AM
Hello Dasun,

If you have grouped RadScheduler by a resource type, the slot object in HandleSchedulerDrop will have a Resource property:

private void HandleSchedulerDrop(int id, string subject, string targetSlotIndex)
        {
            RadScheduler1.Rebind();
  
            ISchedulerTimeSlot slot = RadScheduler1.GetTimeSlotFromIndex(targetSlotIndex);
            //slot.Resource.Key
  
            TimeSpan duration = TimeSpan.FromHours(1);
            if (slot.Duration == TimeSpan.FromDays(1))
            {
                duration = slot.Duration;
            }
  
            ScheduleAppointment(id, subject, slot.Start, slot.Start.Add(duration));
        }


Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Dasun
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or