编辑网格视图数据 [英] Editing Grid View Data

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

问题描述

直接在Web表单中从网格视图数据更新和保存的代码是什么.这是我拥有的代码.请帮助我删除记录和更新记录.提前感谢.

what is the code for updating and saving from grid view data directly in a web form.This is the code i have.Help me out for delete record and update record.thanks in advance.

protected void CancelRecord(object sender, GridViewCancelEditEventArgs e)
  {
      gridRegistrationTableDetails.EditIndex = -1;
      BindData();
  }

  protected void EditRecord(object sender, GridViewEditEventArgs e)
  {
      gridRegistrationTableDetails.EditIndex = e.NewEditIndex;
      BindData();
  }


  protected void UpdateRecord(object sender, GridViewUpdateEventArgs e)
  {

  }


  protected void DeleteRecord(object sender, GridViewDeleteEventArgs e)

  {

  }

推荐答案

使用GridView控件更新,删除记录 [ GridView行编辑,删除和更新 [ ^ ]
插入更新编辑删除行记录在GridView中 [带有Add_Update_Delete操作的GridView [在ASP.NET中可编辑GridView [如何在网格视图中动态创建模板列 [ ^ ]

MSDN:
在GridView控件中使用TemplateFields [ ASP.NET的GridView示例:使用TemplateFields [
Insert, Update, Delete with Gridview....simple way[^]
Updating, Deleting records using GridView control[^]
GridView Row Edit, Delete and Update[^]
Insert Update Edit Delete Rows Record In GridView[^]
GridView with Add_Update_Delete Operations[^]
Editable GridView in ASP.NET[^]
How to create template columns dynamically in a grid view[^]

MSDN:
Using TemplateFields in the GridView Control[^]
GridView Examples for ASP.NET: Working with TemplateFields[^]


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

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