I have a combobox which datasource is custom class list. I have a model class which has different type of property.
function List<CmbItems<string, bool>> getTrueFalses()
{
return new List<CmbItems<string, bool>>
{
new CmbItems<string, bool> { DisplayName = "Y", Value = true },
new CmbItems<string, bool> { DisplayName = "N", Value = false }
};
}
I am using this in combobox(cmbMarried) datasource property. User DisplayName property as DisplayMember and Value property as ValueMember.
I have other Model Class User. Which has property isMarried. Now i want to bind in combobox to that databinding.
How can i do that?
Windows FormsorWPF? - er-shouser.IsMarried = Convert.ToBoolean(cmbBox.SelectedValue)? - er-sho