Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Scheduler by user name

Not answered Scheduler by user name

Feed from this thread
  • Vivek avatar

    Posted on Jul 7, 2011 (permalink)

    Dear Telerik team,

    Do you have some example to show the Scheduler  by user name.

    Suppose I have there users  User 1, User 2 , and User3 in left hand side and on click of first user the Schedule by the user name should come.

    Please guide in right direction.

    if you have some Zip file do send us

    thanks,
    Vivek

    Reply

  • Maarten avatar

    Posted on Jul 8, 2011 (permalink)

    Hello,

    I realy need that too, it would help me alot!

    Thanks in advance!

    Maarten

    Reply

  • Maarten avatar

    Posted on Jul 13, 2011 (permalink)

    Isn't it possible that you can do an import from that username from the iCal extension?
    There is a topic on the forum for that: Import / Export data

    Kind regards,

    Maarten

    Reply

  • Pana Pana admin's avatar

    Posted on Jul 15, 2011 (permalink)

    Hi Maarten,

    You could easily create a ListBox, Fill its ItemsSource with the users and on SelectionChanged of that ListBox go and populate the RadScheduleView or just bind the AppointmentsSource to the selected user's appointments.

    One way would be to use a master-details scenario where the ViewModel of the users are items that have for example UserName property and Appointments property. The ListBox will display the UserName property while the AppointmentsSource of the RadScheduleView would be bound to the ListBox's SelectedItem.Appointments property.

    If you want to use the iCal extension you could handle the SelectionChanged of the ListBox and use the methods described in the help article you have linked and change the appointments of the RadScheduleView.

    Greetings,
    Pana
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • Maarten avatar

    Posted on Jul 15, 2011 (permalink)

    Thanks Pana, that was very useful! Problem's solved.

    Kind regards,
    Maarten

    Reply

  • Vivek avatar

    Posted on Jul 18, 2011 (permalink)

    Hi Maarten/Pana,

    Please guide me with one sample code example.

    Thanks for the help.
    Vivek.

    Reply

  • Maarten avatar

    Posted on Jul 20, 2011 (permalink)

    Hello Pana,

    This is how I did it.

    private void mouseDoubleClick()
            {
                name= (DSV.Person)gridView1.SelectedItem;
                DSV.Person pName = name;
                foundName= pName.Name.ToString();
                String copyFoundName = foundName;
     
                surName= (DSV.Person)gridView1.SelectedItem;
                DSV.Person pSurName= surName;
                foundSurName = pSurName.surName.ToString();
     
                String fullName = foundName+ "." + foundSurName;
     
                string path = "C://Users//Maar//Desktop//iCal//" + fullName+ ".ics";
     
                if (controlName == null || foundName!= controlName)
                {
                    fileLoaded = false;
                    scheduler.Appointments.Clear();
     
                    if (fileLoaded == false)
                    {
                        if (File.Exists(path))
                        {
                            try
                            {
                                using (TextReader reader = new StreamReader(path))
                                {
                                    AppointmentCalendarImporter importer = new AppointmentCalendarImporter();
                                    IEnumerable<IAppointment> appointments = importer.Import(reader);
     
                                    foreach (IAppointment app in appointments)
                                    {
                                        scheduler.Appointments.Add(app);
                                    }
                                    fileLoaded = true;
                                }
                            }
                            catch (CalendarParseException ex)
                            {
                                MessageBox.Show(ex.Message);
                            }
                        }
                        else
                        {
                            MessageBox.Show("There were no appointments found for this user");
     
                        }
                    }
                }
                else
                {
                    MessageBox.Show("The appointments are already loaded");
                }
     
                controlName = copyFoundName;


    If you need more explaining, just ask ;-)

    Kind regards,

    Maarten

    Reply

  • Pana Pana admin's avatar

    Posted on Jul 22, 2011 (permalink)

    Hi,

    Here is an example that changes the appointments source of a RadScheduleView on SelectionChanged of a ListBox.

    Regards,
    Pana
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Scheduler > Scheduler by user name
Related resources for "Scheduler by user name"

WPF Scheduler Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]