Hi,
I have a simple application and I cannot seem to bind a Silverlight 4 combox to a lookup table without a foreign key in VS2010.
I have 2 tables:
tblEmployee
tblState
In the employee table there is a field state. The employee table is the master table and bound to a grid where the user can select an individual employee. There is a detail bound to the employee grid with the individual fields including state. When the application starts "Alabama" is visible in the State Combobox.
The state table is comprised of two fields, the key ID which is a two letter abbrevaiation and Desc with the state name. (I did not create the database, just working with what already exists.)
On my .XAML page I have a detail with the DataContext bound to a grid. When a user selects an Employee all of the bound text and date fields show the employee fields correctly. The combobox just shows "Alabama".
The RIA Code for the State Table is:
<riacontrols:removed autoload="True" d:designdata="{d:DesignInstance my:tblstate, CreateList=true}" height="0" xmlns:d="#unknown" xmlns:riacontrols="#unknown">
LoadedData="tblstateDomainDataSource_LoadedData" Name="tblstateDomainDataSource" QueryName="GetTblstatesQuery" Width="0">
<riacontrols:removed>
<my1:removed xmlns:my1="#unknown">
The xaml for the state combox is:
<removed name="stateComboBox" grid.column="1" grid.row="5">
Height="23" HorizontalAlignment="Right" Margin="0,3,75,3"
VerticalAlignment="Center" Width="92" TabIndex="10"
ItemsSource="{Binding ElementName=tblstateDomainDataSource, Path=Data, Mode=TwoWay}"
SelectedItem="{Binding ElementName=tblstateDomainDataSource, Path=ID, Mode=TwoWay}"
DisplayMemberPath="Desc"
<removed>