|
发表于 2020-1-6 15:00:01
|
显示全部楼层
e.Item.RowIndex
建议在该行放上hidden.然后用findcontrol.
1.在linkbutton模板列上加上
<input type="hidden" id="hidPK" runat="server" value='<%# Eval("PKFieldName")%>' >
2.在rowCommand事件中
HtmlInputHidden hidPk = e.Item.FindControl("hidPK") as HtmlInputHidden;
dbaccess.Delete(hidPk.Value); |
|