• The GridView 'gv ' fired event RowEditing which wasn 't handled.


         很久没写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也是相似的。

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

  • 相关阅读:
    坐标变化
    labelme VOC
    threejs物体设置中心坐标
    IfcProjectOrderTypeEnum
    IfcCostItemTypeEnum
    利用Mono.Cecil动态修改程序集来破解商业组件(仅用于研究学习)
    依赖注入框架Autofac的简单使用
    阿里技术嘉年华官网上线啦!
    Silverlight 4以下版本模拟鼠标双击事件
    iOS学习系列 利用ASIHTTPRequest实现异步队列
  • 原文地址:https://www.cnblogs.com/huige1004/p/1371633.html
Copyright © 2020-2023  润新知