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

DataFormComboBoxField

2 Answers 160 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Gonzalo
Top achievements
Rank 2
Gonzalo asked on 23 Mar 2011, 09:53 PM
<telerik:DataFormComboBoxField DataMemberBinding="{Binding Path=CNTYNAME}"
... 
                           Grid.Column="2"
                           Grid.Row="2"
Could you share a DataFormComboBoxField example in xaml?

I would like to bind a list of Counties to this field CntyName. The list is predefined in code the name of the method is GetCounties()

Best regards,

G

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 24 Mar 2011, 08:11 AM
Hello Gonzalo,

I am sending you a sample project illustrating how you may define the DataFormComboBoxField. Generally, the definition should be as follows:

<telerik:DataFormComboBoxField SelectedValuePath="ID"
                                             DisplayMemberPath="Name"                                                 
                                                 DataMemberBinding="{Binding CountryID, Mode=TwoWay}"
                                 ItemsSource="{Binding Countries, Source={StaticResource MyViewModel}}" />

 

Kind regards,
Maya
the Telerik team
0
Gonzalo
Top achievements
Rank 2
answered on 24 Mar 2011, 02:49 PM
Thank you Maya! I will try and have a happy Telerik day ;-)
Tags
DataForm
Asked by
Gonzalo
Top achievements
Rank 2
Answers by
Maya
Telerik team
Gonzalo
Top achievements
Rank 2
Share this question
or