在winform中修改dategridview指定行问题。 如图,这个dategridview1中有一行为空 我从另一个窗口的dategridview2中选中一条记录,怎么把得到的那条记录添加到这个dategridview中空的那行里? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //获得DateGridView单元格的值,这个Cells[参数]值是你要修改的索引, string name= DateGridView2.CurrentRow.Cells[0].Value.ToString();dataGridView1.Rows[0].Cells["column1"].Value =name; for (int 填 = 0, 列数 = DataGridView.ColumnCount; 填 != 列数; 填++) DataGridView1.Rows[DataGridView1.CurrentCellAddress.Y].Cells[填].Value = DataGridView.Rows[DataGridView.CurrentCellAddress.Y].Cells[填].Value; 读取datagridview值会吧,给单元格赋值会吧,然后你就读值赋值吧。 怎样用 C# 启动其他程序写的 exe 文件 想实现当用户输入一串字母后弹出一个窗口,用于后台配置,用什么方法检测用户任意时刻输入一串字母 请教SQL语句:急 treeview 【求助】如何构建这样的一棵树,在线等,急! 如何从字符串生成类?反序列化还是反射得到呢? 如何求a的b次幂? C#如何把一个string数组中不同的数据给另一个string数组 openFileDialog 用指定的应用程序打开选中的文件 怎样在程序中设置“internet选项”中的“http代理设置”? 请问谁有详细介绍制作。net安装程序的书? 求一个简单的正则表达式 Ueditor怎么加载数据库中的内容
string name= DateGridView2.CurrentRow.Cells[0].Value.ToString();dataGridView1.Rows[0].Cells["column1"].Value =name;
for (int 填 = 0, 列数 = DataGridView.ColumnCount; 填 != 列数; 填++)
DataGridView1.Rows[DataGridView1.CurrentCellAddress.Y].Cells[填].Value = DataGridView.Rows[DataGridView.CurrentCellAddress.Y].Cells[填].Value;