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

Need to refresh scheduleview

2 Answers 427 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Faheem
Top achievements
Rank 1
Faheem asked on 07 Apr 2011, 01:15 PM
I need to refresh schedule view on button click or any event. when i bind data with it first time it works perfectly second time when i changed the data and rebind it, its not refresh the scheduleview

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 12 Apr 2011, 03:45 PM
Hi Faheem,

You can refresh AppointmentsSource property of the RadScheduleView like this:

private void Button_Click(object sender, RoutedEventArgs e)
{
    var appointments = new ObservableCollection<Appointment>();
    appointments.Add(new Appointment() { Subject = "refreshed", Start = DateTime.Now, End = DateTime.Now.AddHours(1) });
    scheduleView.AppointmentsSource = null;
    scheduleView.AppointmentsSource = appointments;
}

Please let us know whether this approach is suitable for your scenario.

Best wishes,
Yana
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
0
Faheem
Top achievements
Rank 1
answered on 12 Apr 2011, 04:19 PM
Thanks, its working... :)
Tags
ScheduleView
Asked by
Faheem
Top achievements
Rank 1
Answers by
Yana
Telerik team
Faheem
Top achievements
Rank 1
Share this question
or