天猫魔盒怎样看电视:combo box控件

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 22:54:12
我想获取combo box控件中某一项内容(即文本)该怎么取得?

.text
当前选择项的文本

private void comboBox_SelectedIndexChanged(object sender,System.EventArgs e)
{
ComboBox cb=(ComboBox)sender;
this.dataGrid1[this.dataGrid1.CurrentCell.RowNumber,1]=comboBox.SelectedItem;
}
这是把值放到dataGrid控件中