Hi,
I want to save the last selected value in a combobox that displays the data of a DB column, I've tried to save it as a text property but it doesn't work.
what can i do?
thanks in advanced.
EDIT:
The code generated in the settings.settings file is like this:
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string TC {
get {
return ((string)(this["TC"]));
}
set {
this["TC"] = value;
}
and the code generated in XML in the app.config file is like this:
<setting name="TC" serializeAs="String">
<value />
</setting>
and it loads the settings by:
this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Calc_tisa.Properties.Settings.Default, "TC", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
I'm wondering if there is a way to change de value on the XML file to the last ValueMember selected in the combobox.