如何使用数据库中的数据进行gridview并使用datatable添加新行 [英] How to have gridview with data from database and add a new row using datatable

查看:96
本文介绍了如何使用数据库中的数据进行gridview并使用datatable添加新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



i有一个问题,我正在开发一个项目,其中我使用GridView,gridview由数据sql server填充,后来我使用datatable在同一gridview中添加新的空行,但是当我添加新行时gridview正在更新第一行值的所有行,我需要一些帮助或者任何建议。



谢谢

Hello everybody

i have got a question, i am developing a project in which i am using a GridView that gridview is filled by data sql server and later i am using datatable to add new empty row in same gridview, but when i am adding new row gridview is updating all rows with value of first row, i need some help in that or any suggestion.

Thanks

推荐答案

这可能有助于简单插入Asp.Net GridView控件中的,选择,编辑,更新和删除 [ ^ ]


从这个例子中学习:在ASP.Net-GridView-Control中添加动态行 - [a href =http://www.aspsnippets。 com / Articles / Adding-Dynamic-Rows-in-ASP.Net-GridView-Control-with-TextBoxes.aspxtarget =_ blanktitle =New Window> ^ ]
Learn from this example: Adding-Dynamic-Rows-in-ASP.Net-GridView-Control[^]


感谢您的回答,但我找到了另一种解决方案。
thanks for answer but i have found another solution .


这篇关于如何使用数据库中的数据进行gridview并使用datatable添加新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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