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

DataFormComboBoxField showing the List<> type

2 Answers 54 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Matt Leeds
Top achievements
Rank 1
Matt Leeds asked on 10 May 2011, 09:55 PM
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 Answers, 1 is accepted

Sort by
0
Matt Leeds
Top achievements
Rank 1
answered on 10 May 2011, 09:59 PM
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.
0
Accepted
Maya
Telerik team
answered on 11 May 2011, 06:34 AM
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
Tags
DataForm
Asked by
Matt Leeds
Top achievements
Rank 1
Answers by
Matt Leeds
Top achievements
Rank 1
Maya
Telerik team
Share this question
or