Gridview -> Template Field -> Button

  • Thread starter Thread starter JB
  • Start date Start date
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!
 
Back
Top