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

ElementName data binding in EditAppointmentDialog

3 Answers 36 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 18 Apr 2011, 05:02 PM
Is it possible to bind to data in the editappointmentdialog template using ElementName? I wish to bind to a list in a viewmodel for a combobox (this viewmodel has a list of appointments which the scheduleview is bound to).

I have used this workaround to be able to bind a list to a combobox in a grid (but this doesn't work in this case):
http://dotnetspeak.com/index.php/2010/05/elementname-binding-inside-silverlight-datagrid/

Thanks

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 22 Apr 2011, 08:42 AM
Hi,

Yes, it is possible to bind data in the EditAppointmentDialog using the ElementName. Please give it a try and if you experience difficulties please give us some more details about your scenario in order to provide you with the proper solution for your case.

Regards,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pete
Top achievements
Rank 1
answered on 03 May 2011, 12:19 PM
I am using the full template for the scheduleview and I am customizing EditAppointmentTemplate controltemplate.
I am using a dummy valueconverter to check the bindings, but nothing happens when using the ElementName binding to access items in the view model (i.e. a list of items to populate a combobox). The only binding that will work is Occurence.Appointment etc.

Could you please explain how you are able to get the binding to work this way?
0
Yana
Telerik team
answered on 09 May 2011, 09:37 AM
Hello Pete,

You can find attached an example which demonstrates how to bind RadComboBox placed in EditAppointmentDialog to a property from the ViewModel, please download the attachment and give it a try.

In general, EditAppointmentDialog shows information only for the appointment, so the recommended approach is to create a custom appointment and add the property which holds the combobox items to it. Then you could bind the combobox using Occurrence.Appointment.ComboBoxItems. This approach is explained in details here.

Please contact us again if you have any additional issues or questions.

Kind regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Pete
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Pete
Top achievements
Rank 1
Yana
Telerik team
Share this question
or