如何插入网格视图行 [英] how to insert row in grid view

查看:102
本文介绍了如何插入网格视图行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要插入一个新行到网格视图,而我使用在SqlDataSource点击与出按钮。以及如何从网格视图编辑,更新和删除行。请帮助我

i want to insert a new row to grid view while i click new button with out using the sqldatasource. and also how to edit, update, and delete rows from grid view. pls help me

[Visual Studio 2008中
asp.net用c#]

[visual studio 2008 asp.net with c#]

谢谢
  thiru

thanks thiru

推荐答案

你说的不使用的SqlDataSource呢?你怎么打算插入的数据传播到数据存储,然后呢?您还没有指定您所使用的另一种方法。

What do you mean by "without using the SqlDataSource" ? How do you intend to propagate the inserted data to the data store, then ? You have not specified what other method you are using.

总之,在GridView不记录本身支持插入,但你可以通过在其上创建领域新的数据输入一个FooterTemplate完成它。此外,提供了一个列,以便插入/取消按钮在FooterTemplate。

Anyway, the GridView does not inherently support insertion of records, but you can accomplish it by creating a FooterTemplate in which you create the fields for entry of new data. Additionally, provide a column to allow for Insert/Cancel buttons in the FooterTemplate.

下面是一个很好的示例:如何轻松插入GridView中一行的SqlDataSource

Here's a good sample: How to easily insert row in GridView with SqlDataSource

这篇关于如何插入网格视图行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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