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

ListBox ItemsSource in CustomAppointmentDialg

1 Answer 34 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Gts
Top achievements
Rank 1
Gts asked on 17 Apr 2014, 12:57 PM
Hi.
I have custom appointment class
public class MyAppointment:Appointment
{
         private List<AppointmentOcurence> _appointmentInterval; 
         public List<AppointmentOcurence> AppointmentInterval
        {
            get { return this.Storage<MyAppointment>()._appointmentInterval; }
            set
            {
                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}"
                                   >
                    <telerik:RadListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding SchedulerName}"/>
                        </DataTemplate>
                    </telerik:RadListBox.ItemTemplate>
                </telerik:RadListBox
 
................................
</ControlTemplate>

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

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 21 Apr 2014, 11:25 AM
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?

Regards,
Yana
Telerik
 

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.

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