添加并更新到DataGridView [英] Add and Update to DataGridView

查看:59
本文介绍了添加并更新到DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文本框中的记录添加到datagridview而不是数据库中,像
这样的字段 txtname
txtsurname
txtfathername

当我双击任何行时,它会加载到文本框中,如果我对此进行了更改,然后单击按钮,它应该在datagridview中更新


提前thx

I Want to Add records from textbox to datagridview not to database, fields like
txtname
txtsurname
txtfathername

And When i double click on any row it load in textboxes and if i made any changes in that and click on button it should update in datagridview


thx in advance

推荐答案

声明数据表并在其中创建三列
在每个条目上创建一个新行,并将其添加到数据表中

用于将数据加载到文本框,您可以处理数据gridview的cellmouseclick事件
declare datatable and make three columns in it
on each entry create a new row and add it to data table

for loading data to textboxes you can work on cellmouseclick event of data gridview


这篇关于添加并更新到DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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