In a gridview I've edited the columns so it only appears buttons, so my question is how can I add the event on that grdview1 for when I click a button doesnt matter in which column.

Recommended Answers

All 2 Replies

how did u make it look into buttons.If you have used template,then you can defined the even in the defination of item template

For button field in GridView, set the CommandName property of the button to some value.
Handle the RowCommand event of GridView and check if the value of the argument 'e' (GridViewCommandEventArgs type) is equal to the value of the button's CommandName.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.