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

Schedulerview multiple Resource Selection

1 Answer 67 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 23 May 2012, 08:23 AM
Hi ,

i am trying multiple resource selection in schedulerview but it default all resource selected in listbox,
this project developed in MVVM patter
i have modify the resource class and Appointment Class modify as task.
 Please check

   ResourceTypeCollection resourcetypecollection = new ResourceTypeCollection();
            ResourceType resourcetype = new ResourceType("Employee");
            resourcetype.AllowMultipleSelection = true;
            CalendarResource resource;
            Task appintmentDetail=new Task();
           
            AddListDetails();
            foreach (var item in EmployeeByGroupDetailList)
            {
               // resource = new Resource(item.Name) { };
                resource = new CalendarResource()
                {
                    DisplayName = item.Name,
                    ResourceName=item.Name,
                    ResourceId=(long)item.AuthorizedUserId,
                    GroupID = EmployeeTaskGroupDetails.EmployeeTaskGroupId,
                };
                resourcetype.Resources.Add(resource);
                
                foreach (var itemdetails in SchedulerDetailsList)
                {
                    if (itemdetails.AuthorizedUserId.Equals(item.AuthorizedUserId))
                    {
                        appintmentDetail = new Task()
                        {
                            Subject = itemdetails.task,
                            Start = Convert.ToDateTime(itemdetails.StartTime),
                            End = Convert.ToDateTime(itemdetails.EndTime),

                            Category = new Category()
                            {
                                CategoryName = itemdetails.TaskType,
                                DisplayName = CategoryTypeCategoryName(itemdetails.TaskType),
                                CategoryBrush = CategoryTypeBrush(itemdetails.TaskType),

                            },
                            Amount = Convert.ToDecimal(4564.213),
                            Completed = Convert.ToBoolean(itemdetails.completed),
                            GroupId = EmployeeTaskGroupDetails.EmployeeTaskGroupId,
                            EmployeeTaskID = itemdetails.refId,
                            RecurringEvent = Convert.ToBoolean(itemdetails.REcurringEvent),
                            Reoccurs = new ReoccursDetails()
                            {
                                ReoccursDisplayName = itemdetails.Recur,
                                ReoccursName = itemdetails.Recur
                            },
                            JobID=(long?)itemdetails.jobid??0,
                            JobNumberText=itemdetails.JobNumber,
                            LocalUniqueCurrentID=itemdetails.LocalUniqueID,
                            
                        };
                        appintmentDetail.Resources.Add(resource);
                  
                        this.Appointments.Add(appintmentDetail);
                    }
                }
                
            }
            resourcetypecollection.Add(resourcetype);
            OnPropertyChanged("Appointments");
            this.ResourceTypes = resourcetypecollection;
            this.Isloading = false;
         

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 29 May 2012, 09:11 AM
Hello Nick,

Please send us more details about the issue you're experiencing with the resources in RadScheduleView.  It would be really helpful if you provide a simple project where the issue can be reproduced.
Thanks in advance

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Nick
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or