组合框到datagridview [英] combobox to datagridview
本文介绍了组合框到datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我有一个带有一些值的组合框....我需要选择它们并将它们添加到datagridview
有人可以帮我编译c#编码吗?
Hi
I have a combobox with some values .... I need to select them and add them to datagridview
Can some one help me in c# coding for that?
推荐答案
在选定的索引内部更改了组合框的事件实现了向datagrid视图添加值的代码,如< br $>
Inside the selected index changed event of combobox implement the code to add values to datagrid view like
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.dataGridView1.Rows.Add("1", "XX");
}
这篇关于组合框到datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文