DataFormComboBoxField showing the List<> type

3 posts, 1 answers
  1. Matt Leeds
    Matt Leeds avatar
    12 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    I have a DataFormComboBoxField which is showing the List<T> type as the display members.  It is in a edit template for a Silverlight DataForm

    Here is the markup for the field:

    <telerik:DataFormComboBoxField Name="SuppliesDDL" Grid.Column="0" Grid.Row="3"
                                   ItemsSource="{Binding SuppliesLookup}" DisplayMemberPath="{Binding SupplyName}"
                                   DataMemberBinding="{Binding SupplyID, Mode=TwoWay}" Margin="5,0,0,0" />

    The bind is partially successful in that I am ending up with the right numbers of items in the drop down boxes for a few of these.  

    The object backing the form is a custom object, and it binds correctly to the form and the DataFormDataField items within this template for the form.






  2. Matt Leeds
    Matt Leeds avatar
    12 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    Not sure that I was clear:

    The combo box is showing the following string for all items in the list:
    "AssetLibrary.BO.Supply", which is the namespace and class name of the type (T) the List<T> consists of.
  3. DevCraft banner
  4. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 11 May 2011 Link to this post

    Hi Matt Leeds,

    The DisplayMemberPath property should be defined as follows:

    DisplayMemberPath="SupplyName"

    You may run through this article for further reference if needed.
     

    All the best,
    Maya
    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
Back to Top