Hello guys i have dataform in silverlight 4 project item source is:
ItemsSource="{Binding Data, ElementName=domainDataSource1, Mode=TwoWay}"
and domain data source is :
<riaControls:DomainDataSource Name="domainDataSource1" QueryName="GetCarsQuery" AutoLoad="True">
<riaControls:DomainDataSource.DomainContext>
<domain:DataDomainContext/>
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
My cars table have relationship with trailers table. I have combobox on my data form where i want to show all trailers marks how i can bind combobox another query? And when user will save data how i can get trailers id with mark?
thanks
First let me preface this by saying ComboBoxes nested in DataForms are currently VERY buggy as of SL5. But here you go, this is using Entity Framework:
The associated class:
In your XAML:
And finally in your combobox (or whatever control with ItemsSource):