我有一个Drop Down List。当索引DDL执行以下操作时,我需要changes.So的值:
private void CMBGroup_SelectedIndexChanged(object sender, EventArgs e)
{
int id=int.Parse(CMBGroup.SelectedValue.ToString());
//do something with id
}
在form load中,我获取数据:
goodGroups=objGoodGroupRepositoy.G
来自微软:“当基础列表更改或列表中的项发生更改时,就会发生BindingSource.ListChanged事件”。
但在我的例子中,事件会触发每个位置的变化。该表单有一个UserControl、一个BindingSource和一个按钮。
用户控件有一个TextBox和两个属性:
/// <summary>
/// Is working: ListChanged is not fired
/// </summary>
public override string Text
{
get { return textBo