Re: GridView RowCommand event not firing!!
- From: "Riki" <riki@xxxxxxxxxxxxx>
- Date: Tue, 8 Aug 2006 17:29:46 +0200
Kevin Attard wrote:
I am using a GridView inside a UserControl which has a template
column for deleting the rows. Before databinding the gridview i am
attaching the RowCommand and RowDataBound event.
I am using the RowDataBound event to set the commandargument of the
delete button. The event is being fired and works fine.
When I press the delete button, the RowCommand event is not firing!
and neither is the RowDeleting (the button's commandName is "Delete")
Any idea why?
Do not databind on postback.
Use a construct like:
If(Not Page.IsPostback) Then
GridView1.DataBind()
End If
If you databind again on postback, the event handling of child buttons is
broken.
--
Riki
.
- Follow-Ups:
- Re: GridView RowCommand event not firing!!
- From: Kevin Attard
- Re: GridView RowCommand event not firing!!
- References:
- GridView RowCommand event not firing!!
- From: Kevin Attard
- GridView RowCommand event not firing!!
- Prev by Date: RE: A little problem with Forms authentication :-(
- Next by Date: How to open a word document saved in sql server in asp.net when using windows XP/2003
- Previous by thread: Re: GridView RowCommand event not firing!!
- Next by thread: Re: GridView RowCommand event not firing!!
- Index(es):