How do I write the button event after dynamically adding a column ?, Ammonium button
A netizen asked a question: "I want to bind data to the gridview through the background code, add a Button in the last column, and click the Button to get a data in the row, I found a program for dynamically generating buttons on the Internet, but I don't know how to add a Click event to this button ":
Maybe I saw Insus. NET this "dynamic for the GridView control create column" http://www.cnblogs.com/insus/archive/2011/06/10/2077538.html. This article only shows how to add a column dynamically. This column is an image button.
To implement the button event for any row or any column in The GridView, including the image button, we need to perform the event OnRowCreated in the GridView..
Then implement in xxx. aspx. cs:
The focus is on the final code example. For more information, please leave a message or ask a question.