Hello!
My situation is the following.
I have a table BP where I have a field BP_S_GENDERCODE. Now I want to create in Silverlight a combobox which shows the data from a table GENDER. When I selected an item, the value GENDER_S_NR from the GENDER table should then be written into the field BP_S_GENDERCODE and also the way back.
My question is now, is this possible and when yes ... how it works.
I tried the following:
tab_GENDERs => Binding to the table GENDER
SelectedBPItem => my selected item from the BP table, which I want to change
BP_S_GENDERCODE => field of the BP table, which I want to change
GENDER_S_NR => field which is used to show the right item in the combobox
GENDER_I_TXT_TAG => Field from the table GENDER which I want to display for the user in the combobox
It works now a little bit, but not so that I can use it. I have the following problems:
- If I select an item from the combobox it is not shown at the first time, when I select it a second time than it is shown???
- If I change between my customers from the BP table there is no change in the displayed value of the combobox
- If I select an item (GENDER_S_NR=2) from the combobox it writes the value "GENDER : 2" into my field BP_S_GENDERCODE, but I only need the value "2"!?!
Are there problems with using a combobox on this way or have I configured something false?
I hope you can help!
Best Regards,
Richard
My situation is the following.
I have a table BP where I have a field BP_S_GENDERCODE. Now I want to create in Silverlight a combobox which shows the data from a table GENDER. When I selected an item, the value GENDER_S_NR from the GENDER table should then be written into the field BP_S_GENDERCODE and also the way back.
My question is now, is this possible and when yes ... how it works.
I tried the following:
<
telerik:RadComboBox
x:Name
=
"cbBP_S_GENDERCODE"
Width
=
"200"
Height
=
"28"
Margin
=
"0 5 0 0"
ItemsSource
=
"{Binding tab_GENDERs}"
SelectedItem
=
"{Binding SelectedBPItem.BP_S_GENDERCODE, Mode=TwoWay}"
DisplayMemberPath
=
"GENDER_I_TXT_TAG"
SelectedValue
=
"GENDER_S_NR"
HorizontalAlignment
=
"Left"
/>
tab_GENDERs => Binding to the table GENDER
SelectedBPItem => my selected item from the BP table, which I want to change
BP_S_GENDERCODE => field of the BP table, which I want to change
GENDER_S_NR => field which is used to show the right item in the combobox
GENDER_I_TXT_TAG => Field from the table GENDER which I want to display for the user in the combobox
It works now a little bit, but not so that I can use it. I have the following problems:
- If I select an item from the combobox it is not shown at the first time, when I select it a second time than it is shown???
- If I change between my customers from the BP table there is no change in the displayed value of the combobox
- If I select an item (GENDER_S_NR=2) from the combobox it writes the value "GENDER : 2" into my field BP_S_GENDERCODE, but I only need the value "2"!?!
Are there problems with using a combobox on this way or have I configured something false?
I hope you can help!
Best Regards,
Richard