很久没写gridview的事件代码了,刚写了个rowcommand的事件,出现下面的错误:

The   GridView   'gv '   fired   event   RowEditing   which   wasn 't   handled.  
Description:   An   unhandled   exception   occurred   during   the   execution   of   the   current   web   request.   Please   review   the   stack   trace   for   more   information   about   the   error   and   where   it   originated   in   the   code.

Exception   Details:   System.Web.HttpException:   The   GridView   'gv '   fired   event   RowEditing   which   wasn 't   handled.

Source   Error:

An   unhandled   exception   was   generated   during   the   execution   of   the   current   web   request.   Information   regarding   the   origin   and   location   of   the   exception   can   be   identified   using   the   exception   stack   trace   below.

查找原因,发现要加入以下事件RowEditing :

.aspx:
<asp:GridView   ID= "GridView1 "   runat= "server "   OnRowEditing= "Editing ">
   <Columns>
     <asp:CommandField   ShowEditButton= "true "   />
   </Columns>
</asp:GridView>

.cs:
protected   void   Editing(object   sender,   GridViewEditEventArgs   e)
{
  GridView1.EditIndex   =   e.NewEditIndex;

}

其他事件,如:Delete,Cancel,Update也是相似的。

编程技巧也跟工具一样,久久不用,就会生锈。记之~~~

转载于:https://www.cnblogs.com/huige1004/archive/2009/01/08/1371633.html

The GridView 'gv ' fired event RowEditing which wasn 't handled.相关推荐

  1. The GridView 'GridViewID' fired event PageIndexChanging which wasn't handled.

    The GridView 'GridViewID' fired event PageIndexChanging which wasn't handled. 解决方法 // 保存数据源 防止丢失 VS的 ...

  2. sharepoint中一些gridview的使用方法

    Question1:将数据绑定到GridView? Question2:如何向GridView中加入格式化的超链接? 答: step1:在GridView中新建一个模板列.        step2: ...

  3. listview+GridView+侧滑菜单+RadioButton+TabLayout

    //效果图如下 //首先把所需要的依赖包导入  gson jar包.imageLoader jar包.design jar包,,,然后导入library,新建项目,把library导入项目中 添加权限 ...

  4. listview多条目 GridView+listview 侧滑 ,TabLayout .PullToRefreshListView PullToRefreshScrollV

    //效果图如下 //首先把所需要的依赖包导入  gson jar包.imageLoader jar包.design jar包,,,然后导入library,新建项目,把library导入项目中 添加权限 ...

  5. 动态生成GridView时,加入DataKeyNames属性,回调时出错解决方法

    早上看到有位同学问关于自动生成GridVie并且添加DataKeyNames属性后 回调页面时,出现错误异常.下面是我实现的方法.注意一点.就是数据绑定的时间. 要是先绑定,再添加到div1中,回调页 ...

  6. GridView学习记录(一)

    今天学习了GridView中的一些功能,主要包括数据的绑定,删除,更新.使用GridView 中的 RowDeleting, RowEditing,RowCancelingEditing,RowUpd ...

  7. Android开发学习笔记:Gallery和GridView浅析

    一.Gallery的简介 Gallery(画廊)是一个锁定中心条目并且拥有水平滚动列表的视图,一般用来浏览图片,并且可以响应事件显示信息.Gallery还可以和ImageSwitcher组件结合使用来 ...

  8. DevExpress控件之GridControl、GridView

    GridControl对应标准WinForm里的GridView,相当于是一个控件,里面包含多个GridView也可以放其它的控件 禁止修改 gridView1.OptionsBehavior.Edi ...

  9. 为GridView添加表头thead

    这个是后台代码 后台代码 protected void gridview1_PreRender(object sender, EventArgs e){AddThead(gridview1);}pro ...

最新文章

  1. 神经网络通过研究任意单个星系,揭示整个宇宙的组成
  2. python 比较列表相邻元素(找相同或去重)
  3. ca证书 linux 导入_Linux CA证书服务器搭建
  4. 【自然框架】之通用权限(四):角色表组
  5. HTML5 音频视频
  6. 以命令方式从ftp服务器上下载和上传文件
  7. WF工作流设计器(WPF版)
  8. linux fstab 权限,linux中fstab文件配置简介
  9. django之vue跨域请求
  10. 新建UE4 c++类
  11. 【教程向】如何用L298N电机驱动模块与Arduino实现PWM调速
  12. docker20.10.7及以下版本安装registry镜像库指引
  13. 实例解析云计算的概念
  14. System Verilog简要笔记
  15. java词云_Java:生成词云(KUMO)
  16. 安装PyTorch后,又安装TensorFlow,CUDA相关问题思考
  17. win10安装的es设置自启动时报错Failed starting ‘elasticsearch-service-x64‘ service
  18. get请求和post请求的区别(简洁易懂)
  19. 毕业设计 stm32的人体健康状态检测系统(项目开源)
  20. FANUC机器人的EE接口使用方法

热门文章

  1. ojdbc14.jar的坑
  2. 税务审计主要是做什么的?审计内容包含哪些?
  3. python爬虫爬取某网站图片
  4. 艾弗森的史诗——漂泊的十三年
  5. Android零基础初学者,急急急
  6. java毕业设计小组学习系统(附源码、数据库)
  7. 高斯过程分类 matlab,matlab 高斯过程回归模型 matlab Gaussian process regression model
  8. #java读书笔记#面向对象2
  9. 电脑连不上网怎么办?无法联网的解决方法
  10. 【Java问题】全网无法解决你的的IDEA中文乱码问题,不妨来看这篇文章