从数据库中检索数据并将其存储在网格中 [英] retrieving data from database and store it in a grid

查看:95
本文介绍了从数据库中检索数据并将其存储在网格中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SQL中有2个表

使用存储过程

i从数据库中检索这两个表并将这些表存储在单个网格视图中



是否可以编辑上面的gridview,我通过storedprocedure回顾了



如果可以进行编辑



请解释怎么做.....

解决方案

编辑网格视图的内容实际上是微不足道的,并且广泛记录在网页。我想你的意思是,你如何存储结果?您需要编写自己的代码,知道网格的哪些方面属于哪个表,确保主键包含在您拥有的数据中,以便您知道要更新的行等等。


要使gridview可编辑,可以使用Gridview的 OnRowediting 事件。

可以让你的任务变得非常简单易懂,



了解这个事件请看看以下链接。



GridView.RowEditing事件



并了解如何实现这一点。请看下面的文章。



ASP.NET 2.0中的可编辑GridView



希望它会有所帮助。 :)

I have 2 tables in SQL
using stored procedure
i retrieved those two tables from database and stored those tables in single grid view

Is it possible to edit the above gridview which i retrived through storedprocedure

if editing could be done

please explain how to do.....

解决方案

Editing the contents of a grid view is really trivial and widely documented on the web. I think what you mean is, how do you store the result ? You need to write your own code that knows which aspects of the grid belong to which table, make sure primary keys are included in the data you have so you know what rows to update, etc.


To make the gridview editable, you can use Gridview's OnRowediting event.
that can make your task really easy and understandable,

to understand this event Kindly have a look at the following link.

GridView.RowEditing Event

and to understand how you can implement this. Do have a look at the following article.

Editable GridView in ASP.NET 2.0

Hope it will help. :)


这篇关于从数据库中检索数据并将其存储在网格中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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