Hello Group,
I use a datagrid with a linkbutton to delete the selected
row.
Added javascript confirm dialogue box in itembound event. The
itemCommand event does not seem to fire when I debug the application.
Any ideas?
Code outline below:
<asp:datagrid id="dbgrdCandidate_List" ForeColor="Black" runat="server"
Width="848px" DataKeyField="Candidate_Id" AllowSorting="True"
AutoGenerateColumns="False" ShowHeader="False" EnableViewState="False">
<asp:TemplateColumn>
<ItemStyle Width="45px"></ItemStyle>
<ItemTemplate>
<asp:LinkButton id="delbutton" runat="server" Width="35" Text="Delete "
CommandName="Delete"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
'Code Behind
Private Sub dbgrdCandidate_List_ItemCommand(ByVal source As Object,
ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dbgrdCandidate_List.ItemCommand
If InStr(e.CommandName, "Delete") Then
'Delete Logic goes here.. ..
End If
End Sub
Thanks,
Sam.