[转载] C# 中comboBox DataBinding 问题# DotNet - 窗口里的风景
H*y
1 楼
【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: Hazy (小迷糊), 信区: Programming
标 题: C# 中comboBox DataBinding 问题
发信站: Unknown Space - 未名空间 (Thu Apr 1 16:27:32 2004) WWW-POST
对DATABINDING的问题总是很头疼.
偶想把comboBoxSuffix 和DataSet BIND 起来,
写了下面这写CODE.
this.comboBoxSuffix.DataSource = DataSet.Suffix.DefaultView;
this.comboBoxSuffix.DisplayMember = "DisplayName";
this.comboBoxSuffix.ValueMember = "SuffixId";
this.comboBoxSuffix.DataBindings.Add("SelectedValue",
DataSet.Suffix.DefaultView, "SuffixId");
问题是: 每次偶 click
发信人: Hazy (小迷糊), 信区: Programming
标 题: C# 中comboBox DataBinding 问题
发信站: Unknown Space - 未名空间 (Thu Apr 1 16:27:32 2004) WWW-POST
对DATABINDING的问题总是很头疼.
偶想把comboBoxSuffix 和DataSet BIND 起来,
写了下面这写CODE.
this.comboBoxSuffix.DataSource = DataSet.Suffix.DefaultView;
this.comboBoxSuffix.DisplayMember = "DisplayName";
this.comboBoxSuffix.ValueMember = "SuffixId";
this.comboBoxSuffix.DataBindings.Add("SelectedValue",
DataSet.Suffix.DefaultView, "SuffixId");
问题是: 每次偶 click