Customized Field - DataFormComboBoxField

3 posts, 0 answers
  1. Vivian
    Vivian avatar
    1 posts
    Member since:
    Nov 2010

    Posted 24 Mar 2011 Link to this post


    How can I define the DataFormComboBoxField in my own Template?
    Take telerik's code for testing:
                <DataTemplate x:Key="MyTemplate">
                        <telerik:DataFormDataField Label="First Name" DataMemberBinding="{Binding FirstName, Mode=TwoWay}" />
                        <telerik:DataFormDataField Grid.Column="1" Label="Last Name" DataMemberBinding="{Binding LastName, Mode=TwoWay}" />
                        <telerik:DataFormComboBoxField Grid.Column="0" Grid.Row="1" Label="Occupation" Width="140"
                                                       ItemsSource="{Binding OccupationPositions}" />

    The comboBox can't get the itemsSource, need help!

  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 29 Mar 2011 Link to this post

    Hello Vivian,

    You will need to set the 3 properties of the combo box field  - ItemsSource, SelectedValuememberPath and DisplayMemberPath.

    The DataContext of the combo field would be the current item of the RadDataForm .

    The way you are setting ItemsSource - ItemsSource="{Binding OccupationPositions}"  means you expect the OccupationPositions is a property of the current item.

    Can you please check and let me know where is the OccupationPositions property defined ?
    Also if you give me enough details on your data model , I will gladly prepare a small working example for you .

    Kind regards,
    Pavel Pavlov
    the Telerik team
  3. DevCraft R3 2016 release webinar banner
  4. Ariel
    Ariel avatar
    8 posts
    Member since:
    Jan 2011

    Posted 27 Feb 2012 Link to this post

    Can you please show me how to set the itemsource for a customized


    ( RadCombobox)  in Content. The itemsource is from a plain WCF service. Thnak you very much
Back to Top