S
simon
If I put button into the header of my DataGrid:
<asp:TemplateColumn>
<HeaderTemplate><asp:Button ID=btnNew Text="New Type"
Runat=server></asp:Button></HeaderTemplate>
<ItemTemplate>
.....
and in codeBehind:
Private Sub btnNew_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnNew.Click
dgdMediaType.CurrentPageIndex = 0
dgdMediaType.DataBind()
dgdMediaType.ShowFooter = True
End Sub
nothing hapens. The onclick event is not fired.
But if I put ><asp:Button ID=btnNew Text="New Type"
Runat=server></asp:Button> somewhere else on the page, outside the datagrid,
then everything works, onClick event is fired.
Why?
Thank you for your answer,
Simon
<asp:TemplateColumn>
<HeaderTemplate><asp:Button ID=btnNew Text="New Type"
Runat=server></asp:Button></HeaderTemplate>
<ItemTemplate>
.....
and in codeBehind:
Private Sub btnNew_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnNew.Click
dgdMediaType.CurrentPageIndex = 0
dgdMediaType.DataBind()
dgdMediaType.ShowFooter = True
End Sub
nothing hapens. The onclick event is not fired.
But if I put ><asp:Button ID=btnNew Text="New Type"
Runat=server></asp:Button> somewhere else on the page, outside the datagrid,
then everything works, onClick event is fired.
Why?
Thank you for your answer,
Simon