数据网格视图 [英] Data Grid View

查看:94
本文介绍了数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C#将gridview的值插入表中?

How to insert values from gridview into table using C#?

推荐答案

在gridview行中循环并逐行插入.您尝试过吗?
Loops through gridview rows and insert row-wise. Did you try?


尝试以下代码
//添加新行并返回行索引
try the following code
// Add the new row and it returns row index
int i = dataGridView.Rows.Add();
dataGridView.Rows[i].SetValues(Enter your column values);


这篇关于数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆