i have a datatable 'Users' with two columns:
'FriendlyName'
'UserName'
i have a datagrid with two columns that I want to bind with the
'Authors' table:
'FriendlyName' : ComboBox column populated from another datatable with
two columns (DisplayMember = 'Name' which holds a FriendlyName and
ValueMember = 'ID' which holds a UserName)
'UserName' : TextBox column to be populated (readonly) from the 'ID'
(ValueMember') of the currently selected 'FriendlyName'
(DisplayedMember)
The idea is that when you select a friendly name from the ComboBox, the
'Author' table then holds that name in 'FriendlyName' and the
corresponding 'UserName'.
I have the combobox column working and both column in the grid that are
binding, but how do I bind the 'ValueMember' of the current combobox to
the second column which is also bound to the 'UserName' column of the
original 'Authors' table?
|