0
我已經使用一個模板字段來添加編輯,更新,刪除和取消圖像圖標。但編輯和刪除模板字段寬度很小,由於寬度較小,這兩個圖像垂直顯示。如何增加模板字段的寬度,以便它可以在水平模板字段寬度在asp.net中的網格視圖中不增加
<asp:TemplateField>
<ItemStyle Width="80px" />
<HeaderStyle Width="80px" />
<FooterStyle Width="80px" />
<ItemTemplate>
<asp:ImageButton ID="btnEdit" runat="server" CommandName="Edit" ImageUrl="img/edit.png" ToolTip="Edit" />
<asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" ImageUrl="img/delete.PNG" ToolTip="Delete" />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="btnUpdate" runat="server" CommandName="Update" ImageUrl="img/icon-update.png" ToolTip="Update" Height="18px" Width="18px" />
<asp:ImageButton ID="btnCancel" runat="server" CommandName="Cancel" ImageUrl="img/icon-Cancel.png" ToolTip="Cancel" CausesValidation="false" Height="16px" Width="16px" />
</EditItemTemplate>
</asp:TemplateField>