ListBox ItemsSource in CustomAppointmentDialg

2 posts, 0 answers
  1. Gts
    Gts avatar
    17 posts
    Member since:
    Jul 2012

    Posted 17 Apr 2014 Link to this post

    I have custom appointment class
    public class MyAppointment:Appointment
             private List<AppointmentOcurence> _appointmentInterval; 
             public List<AppointmentOcurence> AppointmentInterval
                get { return this.Storage<MyAppointment>()._appointmentInterval; }
                    var storage = this.Storage<MyAppointment>();
                    if (storage._appointmentInterval != value)
                        storage._appointmentInterval = value;
                        this.OnPropertyChanged(() => this.AppointmentInterval);

    And I have dialog Template

    <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="telerik:SchedulerDialog">
    <telerik:RadListBox Height="300" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3"
                                        ItemsSource="{Binding Occurrence.Appointment.AppointmentInterval, Mode=TwoWay}"
                                <TextBlock Text="{Binding SchedulerName}"/>

    But when I open dialog I didn't see ant data in ListBox.
    Debugger didn't show any bindings error but ListBox didn't show any data
  2. Yana
    Yana avatar
    4604 posts

    Posted 21 Apr 2014 Link to this post

    Hi Artem,

    I have tested the provided code in a simple project and the ListBox inside EditAppointmentDialog is bound without a problem. I have attached the test project, can you download it and give it a try?
    What is different in your case?


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top