【发布时间】:2011-02-11 13:18:05
【问题描述】:
我刚刚问了一个关于这个主题的问题; All Row has a Delete Button in Gridview
我有一张简单的桌子AVUKAT
列 --> HESAP、MUSTERI、AVUKAT
我在 Gridview 中显示数据。
我激活AutoGenerateDeleteButton。
但是当我单击一行的删除按钮时,我收到这样的错误。
Server Error in '/' Application.
Deleting is not supported by data source 'GridviewDataSource' unless DeleteCommand is specified.
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.NotSupportedException: Deleting is not supported by data source 'GridviewDataSource' unless DeleteCommand is specified.
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.
单击删除按钮时会激活哪个功能?
这个函数的代码应该是什么?
【问题讨论】:
-
Soner 你写过删除代码吗?或者你只是点击这个链接?
-
不,我不写。只是我问我怎么写这段代码:)
标签: c# .net asp.net gridview delete-row