Gridview selectedindexchanged event not firing (ASP.Net 2.0)

J

Julia B

Hi all

I've got a gridview that has a a link button added under certain
circumstances. When the link button is pressed, I assumed that the
selectedindexchanged event would fire but it doesn't. The page does post back
but nothing else happens. Here's the code I use for adding the link button to
the gridview:

If Me.tbStatus.Text <>
RC.RC_Web_AccountMonitor.CommonUtilities.ARStatus.Live.ToString And
Me.tbStatus.Text <>
RC.RC_Web_AccountMonitor.CommonUtilities.ARStatus.Terminated.ToString Then
Dim bfld As New ButtonField
bfld.ButtonType = ButtonType.Link
bfld.CommandName = "btnAmend"
bfld.Text = "Amend"
Me.dgAccs.Columns.Insert(0, bfld)
End If

Any ideas on why the event doesn't fire? Or should I be using another event,
or adding the button in a different way?

Thanks

Julia
 

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

No members online now.

Forum statistics

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

Latest Threads

Top