我们可以直接在gridview中插入数据并将其存储在数据库中吗? [英] Can we insert data directly in gridview and it should store in Database?

查看:57
本文介绍了我们可以直接在gridview中插入数据并将其存储在数据库中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有人知道吗?

我们能否直接在gridview中插入数据并将其存储在数据库中?



Can anyone know?

Can we insert data directly in gridview and it should store in Database?

推荐答案

您可以将GridView绑定到几乎任何种类的集合中.数据不需要来自数据库.数据源可以是数组,列表或自定义对象.此链接提供了将GridView绑定到自定义对象列表的示例.

本质上,您告诉网格视图数据源是什么,并调用其databind方法.

绑定列表GridView或ListView控件的自定义类的说明
You can bind the GridViewto just about any kind of collection. The data does not need to come from a database. The datasource can be an array, a List, or a custom object. This link has an example of binding the GridView to a custom object list.

Essentially you tell the grid view what the datasource is and call its databind method.

Binding List of Custom Class to GridView or ListView Control


这篇关于我们可以直接在gridview中插入数据并将其存储在数据库中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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