两岸青山对峙,绿树滴翠。一个真正的旅行家必是一个流浪者,经历者流浪者的快乐诱惑和探险意志。旅行必须流浪式,否则便不成其为旅行。
ui:
<asp:TemplateField HeaderText="Operation" ShowHeader="False">
<ItemStyle Width="100px" />
<ItemTemplate>
<table width="100%">
<tr>
<td align="center" valign="middle">
<asp:ImageButton ID="imgUpdate" CommandName="update" ToolTip="Update" ImageUrl="~/App_Themes/Images/edit.png"
runat="server" />
<%--<a rel="nofollow noopener noreferrer" href="ApplicationDetail.aspx?type=update&ApplicationID=<%#Eval("ApplicationID") %>">
<img style="border: 0" width="12" height="12" alt="Update" src="../Themes/images/edit.png" /></a>--%>
</td>
<td align="center" valign="middle">
<asp:ImageButton ID="imgDelete" CommandName="delete" ToolTip="Delete" ImageUrl="~/App_Themes/Images/del.png"
runat="server" />
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="View">
<ItemTemplate>
<a rel="nofollow noopener noreferrer" href="DraftVesselOrderDetail.aspx?ServiceID=<%#Eval("Number") %>&TripSelectedIndex= <%# Container.DataItemIndex %>">
<img style="border: 0" alt="View" src="../../App_Themes/Images/preview.gif" /></a>
</ItemTemplate>
</asp:TemplateField>
Code:
protected void gdvOrderList_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName.ToLower())
{
case "view":
var serviceId = long.Parse(e.CommandArgument.ToString());
Response.Redirect("DraftOrderDetail.aspx?type=view&ServiceID=" + serviceId + "&FromPage=Order&GridPageIndex=" + serviceId);
break;
}
}
以上就是datagrid行内按钮(更新/删除等)操作实现代码。工作的质量,决定生活的质量,能力比金钱重要万倍。更多关于datagrid行内按钮(更新/删除等)操作实现代码请关注haodaima.com其它相关文章!