Schedulerview multiple Resource Selection

2 posts, 0 answers
  1. Nick
    Nick avatar
    17 posts
    Member since:
    Feb 2011

    Posted 23 May 2012 Link to this post

    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;
             
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 May 2012 Link to this post

    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 >>

  3. DevCraft banner
Back to Top