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

Create Dialog does not show

2 Answers 46 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Dusan
Top achievements
Rank 1
Dusan asked on 30 Aug 2012, 09:41 AM

Greetings,

I have a problem with RadScheduleView (WPF). I am starting with it and I have read from you documentation that if I make double click on the schedule view then "create dialog" should appear but i does not. Edit dialog and Delete dialog for existing event will appear but create dialog never shows. I have very easy application. I just put RadScheduleView from toolbox and made binding.

You can see it at the bottom

Could you tell me what I am doing wrong?

Thanks

Dusan Hudecek

MainWindows.xaml:

<Window x:Class="SchedulerWPF2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Grid>
<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}" HorizontalAlignment="Left" Margin="10,10,0,0" Name="radScheduleView1" VerticalAlignment="Top">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition />
<telerik:WeekViewDefinition />
<telerik:MonthViewDefinition />
<telerik:TimelineViewDefinition />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
</Grid>
</Window>

MainWindow.xaml.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

using Telerik.Windows.Controls.ScheduleView;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;

namespace SchedulerWPF2
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public DataContext dc = new DataContext();
public RadObservableCollection<IAppointment> Appointments { get { return dc.Appointments; } set { dc.Appointments = value; } }

public MainWindow()
{
InitializeComponent();

dc.Appointments = new RadObservableCollection<IAppointment>();
this.DataContext = dc;

Appointment a = new Appointment();
a.Start = DateTime.Now;
a.End = DateTime.Now.AddHours(1);
a.Subject = "test";

dc.Appointments.Add(a);
}
}

public class DataContext
{
public RadObservableCollection<IAppointment> Appointments { get; set; }
}
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 03 Sep 2012, 06:00 AM
Hello Dusan,

Could you please change the AppointmentsSource of the ScheduleVIew to be of type RadObservableCollection<Appointment> instead of RadObservableCollection<IAppointment> (just do not use the interface here) ?

Let us know whether this helps.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dusan
Top achievements
Rank 1
answered on 03 Sep 2012, 08:28 AM

Greetings,

thank you for your help.

It is working now.

Tags
ScheduleView
Asked by
Dusan
Top achievements
Rank 1
Answers by
Yana
Telerik team
Dusan
Top achievements
Rank 1
Share this question
or