在GridView中插入新的原始数据 [英] Insert new raw in GridView

查看:110
本文介绍了在GridView中插入新的原始数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一张表Employee Master ....已绑定到gridview

我想通过gridview插入新员工..我可以编辑,更新和删除bt,不知道插入新记录的想法.... pls请尽快给出示例答复
:confused:

Hi all

I have one table Employee Master ....which is bind in gridview

i want to insert new Employee through gridview..i can do edit,update & delete bt no idea about insert new record.....pls give reply with example as soon as possible
:confused:

推荐答案

将行插入数据库,然后重新绑定到数据库,从而填充网格.通常,您可以使用一种表格来接受所需的值.
You insert the row into the database, then you rebind to it, which populates the grid. You typically have a form for doing this, to accept the required values.


Gridview默认情况下不支持插入.如果要插入新项目,则应使用detailsview或formview控件.
但是,有一种解决方法:
将页脚行与文本框字段(以及其他字段,如果需要)一起使用以插入行.
您会在网上找到很多相同的文章.
这是其中之一:
使用GridView插入新记录 [
Gridview doesn''t support insert by default. if you want to insert a new item you should use the detailsview or formview control.
However there is a work around:
Use footer rows with textbox fields(and other fields if required) to insert a row.
You will find a lot of articles on the web for the same.
Here is one of them:
Use GridView to insert new record[^]


Accept answer if it helps you...


这篇关于在GridView中插入新的原始数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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