我想在gridview上有2个不同的图标。 (表ID =" gvOrders"表ID =" gvOrders2"在同一级别上)
<form id="form1" runat="server">
<div style="overflow-x: hidden; overflow-y: hidden; width: 100%; height: 100%; margin-left: 147px;">
<asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" CssClass="Grid" DataKeyNames="ABI" OnRowDataBound="OnRowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<img alt = "" style="cursor: pointer" src="pics/plus.png" />
<asp:Panel ID="pnlOrders" runat="server" Style="display: none">
<asp:Table ID="gvOrders" runat="server" CssClass = "ChildGrid">
</asp:Table>
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<img alt = "" style="cursor: pointer" src="pics/plus.png" />
<asp:Panel ID="pnlOrders2" runat="server" Style="display: none">
<asp:Table ID="gvOrders2" runat="server" CssClass = "ChildGrid">
</asp:Table>
</asp:Panel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</form>
和js
<script type="text/javascript">
$("[src*=plus]").live("click", function ()
{
$(this).closest("tr").after("<tr><td></td><td colspan = '999'>" + $(this).next().html() + "</td></tr>")
$(this).attr("src", "pics/minus.png");
});
$("[src*=minus]").live("click", function ()
{
$(this).attr("src", "pics/plus.png");
$(this).closest("tr").next().remove();
alert($(this).attr("src"));
});
</script>
我的问题: 可以为“gvOrders”提供一个图标&#39;一个用于&#39; gvOrders2&#39;?
提前感谢!