显示从数据库到数据网格的保存记录 [英] show save records from database to datagrid

查看:102
本文介绍了显示从数据库到数据网格的保存记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的表单中,两个文本框和一个命令按钮以及一个datagrid.i想要我在数据库中保存哪些记录也显示在datagrid上。

解决方案

有许多在线样本,包括CodeProject.com上如何使用各种数据绑定控件。我建议在这里搜索文章网站, http://www.codeproject.com/search.aspx [ ^ ]以及在google上查看c#datagrid的示例。



基本上如果你将控件放在表单上,​​右上方会有一个小工具提示,通常会有一个项目菜单。在将有一个向导将引导您将其绑定到您的数据库。这将是最简单的方法。



然后,如果你遇到某些具体问题,请回来询问具体问题。


< blockquote>这可能会帮助你:

http://khanrahim.wordpress.com/2010/04/10/insert-update-delete-with-datagridview-control-in-c-windows-application/ [ ^ ] :)



-KR


In my form two textbox and one command button and one datagrid.i want what records i save in database that records also show on datagrid.

解决方案

There are many samples online including on CodeProject.com of how to use the various databound controls. I would recommend searching the articles site here, http://www.codeproject.com/search.aspx[^] as well as looking on google for examples of c# datagrid.

Essentially if you drop the control on your form there will be a little tooltip in the upper right usually that has a menu of items. On there will be a wizard that will walk you through binding it to your database. That will be the easiest method.

Then, if you get stuck on something specific please come back and ask a specific question.


This would probably help you out :
http://khanrahim.wordpress.com/2010/04/10/insert-update-delete-with-datagridview-control-in-c-windows-application/[^] :)

-KR


这篇关于显示从数据库到数据网格的保存记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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