ASP.net中的DataGrid视图删除按钮触发事件问题 [英] DataGrid view delete button firing event problem in ASP.net
本文介绍了ASP.net中的DataGrid视图删除按钮触发事件问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个dataolrid视图与multicoloumn我需要删除网格recods与确认,在代码后面的文件事件lnkDelete_Click没有开火可以任何帮助我删除网格中的recodrs
i had a datagrid view with multicoloumn i need to delete grid recods with confirmation, in code behind file the event lnkDelete_Click not firing can any help me to delete the recodrs in grid
<Columns>
<asp:CommandField Visible="false" />
<asp:BoundField DataField="EntryTypeName" Visible="true" HeaderText="EntryTypeName"></asp:BoundField>
<asp:BoundField DataField="ProductName" Visible="true" HeaderText="ProductName"></asp:BoundField>
<asp:BoundField DataField="VersionNumber" Visible="true" HeaderText="Version "></asp:BoundField>
<asp:BoundField DataField="BugID" Visible="true" HeaderText="BugID"></asp:BoundField>
<asp:BoundField DataField="SupportID" Visible="true" HeaderText="SupportID"></asp:BoundField>
<asp:BoundField DataField="Description" Visible="true" HeaderText="Description"></asp:BoundField>
<asp:BoundField DataField="Date" Visible="true" HeaderText="Date"></asp:BoundField>
<asp:BoundField DataField="Effort" Visible="true" HeaderText="Effort"></asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkDelete" Runat="server" onclick="lnkDelete_Click" OnClientClick="return confirm('Are you sure you?');"
CommandName="Delete">Delete</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
推荐答案
删除
CommandName="Delete"
并尝试!
您可以使用Gridview的RowCommand_event,并在那种情况下根据您的要求删除记录
试试这个
网格视图的命令事件 [ ^ ]
you can use RowCommand_event of Gridview and in that event delete the record as per your requirement
try this
rowcommand event of gridview[^]
看看打击,可能对你有帮助。
http://www.aspdotnet -suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html [ ^ ]
谢谢你。
See the blow,may its helpful to u.
http://www.aspdotnet-suresh.com/2011/02/how-to-inserteditupdate-and-delete-data.html[^]
Thank u.
这篇关于ASP.net中的DataGrid视图删除按钮触发事件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文