posts - 26, comments - 18, trackbacks - 0, articles - 82

GridView 激发了未处理的事件“RowEditing”

Posted on 2011-12-21 09:20 Lerry.Zhao 阅读(187) 评论(0) 编辑 收藏

开发过程中遇到了GridView 激发了未处理的事件“RowEditing”这样的一个错误,

但是可以确定的是我没有在GridView中使用RowEditing方法,可是为什么回报这错误呢?

通过在网上搜索,发现如果在

<asp:ButtonField ShowHeader="true" CommandName="edit" ButtonType="Link" HeaderText="修改"
                        HeaderStyle-Width="5%" DataTextFormatString="select{0}" Text="修改" ItemStyle-HorizontalAlign="Center" />中CommandName的值是“edit”的话就会报错这样的错误。

随后修改edit换成其他的名字就不再报错了。