We have a Silverlight object embedded in an aspx-page. When the page loads, the Silverlight component loads like it should and gets some data from a web service, which is bound nicely to ScheduleView's DataContext.
When a user clicks a button on the aspx-page the server generates new data and uses ScriptManager.RegisterStartupScript to call a JavaScript function which in turn calls a method in the Silverlight component to refresh the data from the web service. The web service returns the new data which is converted to a ViewModel and bound to ScheduleView's DataContext. Setting the DataContext doesn't update ScheduleView with the new data though. What should be done so that the ScheduleView would update?
I've been following the article "RadScheduleView for Silverlight - Implementing View-ViewModel". In addition there's just the JavaScript on the aspx-page which calls a method in the code-behind for MainPage and gets the new data from the web service. The DataContext is then set during the AsyncCompleted event.
Edit: Does this have to do with the UI not refreshing because the DataContext is set in the AsyncCompleted event? RadScheduleView implements IPropertyChangedListener, is it related? Where can I find information about the interface?
Edit2: Setting the CurrentDate property in the same method updates the DateGroupDescription, but setting DataContext doesn't update the ResourceGroupDescriptions or the Appointments.
Thank you.