Hello
I am new to visual studio development and i am having trouble with
the following :
I have a form with a combobox :
and I want that when the user selects a value in the combobox, the selected value will be saved in the database record field.
I tried this :
but this property is an object and the id field is an int.
how should this be done ?
thanks
I am new to visual studio development and i am having trouble with
the following :
I have a form with a combobox :
Code:
this.cboCivilite.DataSource = DataRepository.CiviliteProvider.GetAll();
cboCivilite.DisplayMember = CiviliteColumn.Description.ToString();
cboCivilite.ValueMember = CiviliteColumn.IdCivilite;
and I want that when the user selects a value in the combobox, the selected value will be saved in the database record field.
I tried this :
Code:
part.IdCivilite = cboCivilite.SelectedValue;
but this property is an object and the id field is an int.
how should this be done ?
thanks