C#中ComboBox的SelectedIndexChanged事件获取Tag值
DataTable table = new DataTable;
/// <summary>
/// 点击Cmb控件时获取Tag值
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmbChoice_SelectedIndexChanged(object sender, EventArgs e)
{
DataRow rows = table.Select("绑定显示字段= '" + cmbChoice.SelectedItem.ToString() + "'")[0];
cmbChoice.Tag = rows["绑定值ID"].ToString();
}
/// <summary>
/// 获取到ComboBoxTag值后进行其他操作
/// </summary>
/// <returns></returns>
public void GetInfo()
{
string cmbtag = cmbChoice.Tag; //获取到当前选中的值
}