如何使用c#.net将DataTable绑定到asp.net中的Gridview [英] How to Bind the DataTable to Gridview in asp.net using c#.net

查看:145
本文介绍了如何使用c#.net将DataTable绑定到asp.net中的Gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,我的要求是,我有一个三个输入字段,如(三个texboxes)和一个gridview。 将数据输入文本框然后单击保存按钮,数据将保存到Gridview(不在数据库中)。 如果我们可以输入数据5次, gridview包含5条记录,Gridview也可以有Edit选项。如果我们可以编辑行。数据只能在Gridivew中更改。



请任何人帮助我..

Hi friends, My requirement is , I have a three entry fields like( three texboxes) and one gridview. after entering the data into textboxes then clicking the Save button the data will be saved into Gridview (not in database). if we can enter the data 5 times, gridview contains 5 records and also Gridview can have Edit option. If we can edit the rows . Data can changed in Gridivew only.

Please any one help me..

推荐答案

这里有一些符合您要求的链接。



1. 创建DataTable [< a href =http://www.dotnetperls.com/datatabletarget =_ blanktitle =New Window> ^ ]

2. 如何创建数据表并使用C#添加行 [ ^ ]

3. 如何在datagridview中编辑和保存? [ ^ ]
Here are some links to meeting your requirements.

1. Create DataTable[^]
2. How to create a datatable and add rows using C#[^]
3. How to edit and save in datagridview?[^]


您好..

这里有可能对您有帮助的链接



http://www.aspsnippets.com/Articles/Create- DataTable-dynamic-and-bind-to-GridView-in-ASPNet.aspx [ ^ ]



http://www.aspdotnet-suresh.com/2012/03/dynamically-create-and -add-data-to.html [ ^ ]



http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete- data.html [ ^ ]





Happy Coding ..
Hi..
here are the links which may help you

http://www.aspsnippets.com/Articles/Create-DataTable-dynamically-and-bind-to-GridView-in-ASPNet.aspx[^]

http://www.aspdotnet-suresh.com/2012/03/dynamically-create-and-add-data-to.html[^]

http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html[^]


Happy Coding..


这篇关于如何使用c#.net将DataTable绑定到asp.net中的Gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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