Gridview -> Template Field -> Button

J

JB

Hi,

I have two buttons that are within the template field, of a gridview.

The gridview is in a web control. I am able to deletage most of the events
that the gridview fires, with the code below:-
AddHandler ProductGrid.RowEditing, AddressOf gvProduct_RowEditing
AddHandler ProductGrid.RowCancelingEdit, AddressOf
gvProduct_RowCancelingEdit
AddHandler ProductGrid.RowUpdating, AddressOf gvProduct_RowUpdating
AddHandler ProductGrid.RowDataBound, AddressOf gvProduct_RowDataBound

They work as expected, no issues.

However I can not get the event to fire once I click the button. Other
websites suggest that the following will work:-
AddHandler ProductGrid.RowCommand, AddressOf gvProduct_RowCommand

However when I click the button, that event doesn't fire.

I am using VB.NET 2005.

Any help would be most appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top