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

Combobox complex databinding

1 Answer 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tarik
Top achievements
Rank 1
Tarik asked on 05 Jun 2015, 08:06 PM

Hello, i would like to bind a combobox to a list like bellow, and in the combobox i would like to use Designation which is a property of Regulation property of my DTO as a display memberpath, and RegulationId as a SelectedValuePath, wich is a Regulation property Too

List<RegulationDto> list = MyWebService.GetList();

Here the DTO:

public class RegulationDto{
        public Regulation regulation;
        public List<ExceptionRegulation> regulationExceptions;
        public List<PointPassageDTO> pointsPassages;
}

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 10 Jun 2015, 06:56 AM
Hello Tarik,

Please, check the following code - snippet that demonstrates how to achieve the desired:
<telerik:RadComboBox Width="200" x:Name="radComboBox" ItemsSource="{Binding list}" DisplayMemberPath="regulation.Designation " SelectedValuePath="regulation.RegulationId "/>

We hope this will help you.

Regards,
Nasko
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
ComboBox
Asked by
Tarik
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or