0
我想將最後選定的值保存在顯示數據庫列的數據組合框中,我嘗試將其保存爲文本屬性,但它不起作用。將上一個選定的項目保存在組合框中
我該怎麼辦?
在此先感謝。
編輯:
在settings.settings文件生成的代碼是這樣的:
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string TC {
get {
return ((string)(this["TC"]));
}
set {
this["TC"] = value;
}
並且在app.config文件XML生成的代碼是這樣的:
<setting name="TC" serializeAs="String">
<value />
</setting>
它通過以下方式加載設置:
this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Calc_tisa.Properties.Settings.Default, "TC", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
我想知道是否有方法將XML文件上的de值更改爲組合框中選定的最後一個ValueMember。
請發佈您的一些代碼,以便我們提供幫助。 – 2009-08-17 18:36:29