From: Tony WONG on
the rowcommand is not fired by dynamic button

when the button is clicked, the page is posted back, button disspear.

some posts advise to recreate the button after postback in order to mark the
RowCommand work.

the button is created at runtime by
BtnCancellSchedule.Text = "Cancell"
BtnCancellSchedule.ID = "DDD"
BtnCancellSchedule.CommandName = "Cancell"
e.Row.Cells(4).Controls.Add(BtnCancellSchedule)

But i do not know to to recreate the button

Could you advise me some details. Thanks.

tony


From: Tony WONG on
Thanks it is fixed by

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Handles Me.Load
If Not IsPostBack Then
xxxxxxxxxxxxxxxxxxxx
Else
GridView.DataBind()
End If
End Sub


"Tony WONG" <x34(a)netvigator.com> ���g��l��s�D:%233ct1WO7KHA.3504(a)TK2MSFTNGP05.phx.gbl...
> the rowcommand is not fired by dynamic button
>
> when the button is clicked, the page is posted back, button disspear.
>
> some posts advise to recreate the button after postback in order to mark
> the RowCommand work.
>
> the button is created at runtime by
> BtnCancellSchedule.Text = "Cancell"
> BtnCancellSchedule.ID = "DDD"
> BtnCancellSchedule.CommandName = "Cancell"
> e.Row.Cells(4).Controls.Add(BtnCancellSchedule)
>
> But i do not know to to recreate the button
>
> Could you advise me some details. Thanks.
>
> tony
>