如何在asp.net中合并编辑控件列和图像列?
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" HeaderText="Edit controls"
ButtonType="Image" DeleteImageUrl="~/Styles/Images/Delete.jpg" EditImageUrl="~/Styles/Images/Edit.jpg" />
<asp:TemplateField HeaderText="DashBoard">
<ItemTemplate>
<asp:ImageButton ID="imgbtn_ViewDashBoard" ImageUrl="Styles/Images/dash.jpg" Enabled="True"
Width="" runat="server" PostBackUrl='<%# Eval("MsgID", "ResponseMetric.aspx?MsgID={0}") %>'
Text='Send'></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
我不想将两列显示在同一列中。可以删除仪表板的标题字段以及编辑控件下的所有内容。如何做到这一点。谢谢。
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" HeaderText="Edit controls"
ButtonType="Image" DeleteImageUrl="~/Styles/Images/Delete.jpg" EditImageUrl="~/Styles/Images/Edit.jpg" />
<asp:TemplateField HeaderText="DashBoard">
<ItemTemplate>
<asp:ImageButton ID="imgbtn_ViewDashBoard" ImageUrl="Styles/Images/dash.jpg" Enabled="True"
Width="" runat="server" PostBackUrl='<%# Eval("MsgID", "ResponseMetric.aspx?MsgID={0}") %>'
Text='Send'></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
Instead of having two columns I would Like to display both in same column. Header field can be removed for dashboard, everything under edit controls. How to do that. Thanks.
这应该有效:
This should work: