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

Cannot add new appointment

3 Answers 94 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Daniel Lisowski
Top achievements
Rank 1
Daniel Lisowski asked on 25 Jan 2012, 12:28 AM
I am trying to install/configure the RadScheduleView to work within SharePoint 2010 by using this demo as a guide http://demos.telerik.com/silverlight/#ScheduleView/FirstLook . Although I have successfully been able to display the day / week / month / timeline calendar, I have no way to add new appointments. There are no buttons and the context menu does not work either. I am using RadControls_for_Silverlight4_2011_3_1116_Dev.

In troubleshooting I found the demo app was referencing "ViewModel", however, my code would not compile. I created a ViewModel.cs class file in the same folder as my calendar application. I commented out all the "ViewModel" references. So I expect this is where my problem lies. If so, how to I successfully reference my ViewModel.cs file? All of my files are located in the same folder and I copied your demo code files there too.

Here are the namespaces I have in my Schedule.xaml page related specifically to telerik:
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:schedule="clr-namespace:Telerik.Windows.Controls.ScheduleView;assembly=Telerik.Windows.Controls.ScheduleView"
xmlns:scheduleView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"

Do you have a zip file of the demo?
Please help. Thanks.

3 Answers, 1 is accepted

Sort by
0
Daniel Lisowski
Top achievements
Rank 1
answered on 25 Jan 2012, 03:31 PM
It appears the Telerik demo uses a MVVM format. I am trying to better understand this model ... so if I have re-created all of the demo files in my own solution then why does my solution fail to reference my "ViewModel" class. It lives in the same folder as the calling page. In the demo there is a UserControl.Resource tag:
<UserControl.Resources>
        <local:ViewModel x:Key="ViewModel"
    AppointmentsSource="/ScheduleView;component/DataSources/TvSchedule/Appointments.xaml" />

My solution does not use the <UserControl> object, but rather users a <Navigation:Page> object. Therefore I coded my solution to use:
<navigation:Page.Resources>
    [I presume this is where my error is since I do not reference my ViewModel's AppointmentsSource. The reason I removed it was becuase I am calling the xaml file from somewhere else. What is this reference for? Why is it calling the xaml page here?]
</navigation:Page.Resources>

Thanks
0
Daniel Lisowski
Top achievements
Rank 1
answered on 25 Jan 2012, 03:35 PM
After further reviewing the ViewModel reference, it appears it is referencing the "Appointments.xaml" file because that is the datasource that is populating the schedule. If true, then I would need to reference my datasource here, right? Since I am using SharePoint 2010 as the datasource I then need to add a reference to my SharePoint list name. Would this be right?
0
George
Telerik team
answered on 30 Jan 2012, 01:47 PM
Hello Daniel,


Please, refer to our online documentation where you can find detailed information about RadScheduleView data binding support - http://www.telerik.com/help/silverlight/radscheduleview-populating-with-data-data-binding-support-overview.html. What I would suggest is getting the data from the sharepoint server and generate an appropriate schedule data items and pass them to the control.

 

Regards,
George
the Telerik team

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

Tags
ScheduleView
Asked by
Daniel Lisowski
Top achievements
Rank 1
Answers by
Daniel Lisowski
Top achievements
Rank 1
George
Telerik team
Share this question
or