B
BrianDH
Hi
I have a web form with a Datagrid. Within the data grid I have a Column
button. If the button is of type "Linkbutton" my VB code-behind will catch
the users
"click"
However, if it is set to "Pushbutton" I am unable to trap the users
click. See code Below.
I don't understand what I am missing. why won't the
"Pushbutton" work?
VB code Behind:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.ItemCommand
'get value of row here
End Sub
HTML:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp
ataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 80px; POSITION:
absolute; TOP: 140px" runat="server" Width="484px">
<Columns>
<asp:ButtonColumn Text="Select" ButtonType="PushButton"
CommandName="Select"></asp:ButtonColumn>
</Columns>
</asp
ataGrid>
</form>
</body>
I have a web form with a Datagrid. Within the data grid I have a Column
button. If the button is of type "Linkbutton" my VB code-behind will catch
the users
"click"
However, if it is set to "Pushbutton" I am unable to trap the users
click. See code Below.
I don't understand what I am missing. why won't the
"Pushbutton" work?
VB code Behind:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.ItemCommand
'get value of row here
End Sub
HTML:
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp
absolute; TOP: 140px" runat="server" Width="484px">
<Columns>
<asp:ButtonColumn Text="Select" ButtonType="PushButton"
CommandName="Select"></asp:ButtonColumn>
</Columns>
</asp
</form>
</body>