Je viens de poser une question à ce sujet; All Row has a Delete Button in GridviewGridview Supprimer le bouton dans ASP.NET
J'ai une simple table AVUKAT
Colonnes ->HESAP
, MUSTERI
, AVUKAT
Et je montre les données dans un GridView. J'ai activé AutoGenerateDeleteButton
.
Mais quand je clique sur le bouton Supprimer pour une ligne, je reçois une erreur comme ça.
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.
Quelle fonction est activée lorsque je clique sur le bouton Supprimer?
Quel devrait être le code de cette fonction?
Soner avez-vous écrit du code pour la suppression? Ou vous venez de frapper ce lien? –
Non je n'écris pas. Juste je demande comment puis-je écrire ce code :) –