将记录添加到数据表 [英] add records to Data Table

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

问题描述

你好
我制作了一个Win窗体,它包含一些文本框字段和一个按钮.问题在于,如何在每个按钮的数据表中动态添加行,请单击

Hello
I have made a Win form It contains some text box fields and a button.The problem is that, How to dynamically add rows in the datatable in each button click

推荐答案

您是否在谈论数据库中的数据表.在按钮单击事件上,编写一些代码以从文本框中收集值,然后使用ado.net将其插入到表中.
Are you talking about a data table in database. On the button click event, write some code to collect the values from your textboxes and insert the value to your table using ado.net.


看一下其中包含许多内容的代码.与DataTable相关的内容... DataTable-添加,修改,删除,过滤,对行进行排序和添加从Xml/向Xml读/写 [ ^ ]
Hi, Take a look at this one it contains many things related to DataTable... DataTable - Adding, Modifying, Deleting, Filtering, Sorting rows & Reading/Writing from/to Xml[^]


这篇关于将记录添加到数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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