Gridview -> Template Field -> Button

Discussion in 'ASP .Net' started by JB, Nov 11, 2008.

  1. JB

    JB Guest

    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!
     
    JB, Nov 11, 2008
    #1
    1. Advertising

  2. JB

    JB Guest

    bump

    "JB" wrote:

    > 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!
     
    JB, Nov 11, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Ym9iYnk=?=

    Button and Template field

    =?Utf-8?B?Ym9iYnk=?=, Sep 5, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    430
    =?Utf-8?B?Ym9iYnk=?=
    Sep 5, 2007
  2. Chuck
    Replies:
    0
    Views:
    269
    Chuck
    Nov 10, 2003
  3. mitch-co2
    Replies:
    2
    Views:
    279
    mitch-co2
    Feb 22, 2005
  4. Sound
    Replies:
    2
    Views:
    453
    Randy Webb
    Sep 28, 2006
  5. jr
    Replies:
    3
    Views:
    426
Loading...

Share This Page