如何使用不同的单个切换按钮隐藏/显示网格视图中的特定行?例如,如果我单击一个按钮,它将隐藏网格视图的第三行,当我再次单击它时,它将显示该行。
这是我的aspx代码:
<form id="form1" runat="server">
<div>
<button id="Button1" type="button" runat="server" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off">
Transcript of Records
</button>
<button id="Button2" type="button" runat="server" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off">
Checklist
</button>
<button id="Button3" type="button" runat="server" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off">
Registration Form
</button>
<button id="Button4" type="button" runat="server" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off">
Good Moral
</button>
<button id="Button5" type="button" runat="server" class="btn btn-default" data-toggle="button" aria-pressed="false" autocomplete="off">
Honorary Dismissal
</button>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Name" HeaderText="Name of Request" HeaderStyle-Width='100px'/>
<asp:BoundField DataField="TAT" HeaderText="Processing Time" HeaderStyle-Width='100px'/>
<asp:BoundField DataField="QTY" HeaderText="Quantity" HeaderStyle-Width='100px'/>
<asp:BoundField DataField="Price" HeaderText="Price" HeaderStyle-Width='100px'/>
<asp:BoundField DataField="Total" HeaderText="Total" HeaderStyle-Width='100px'/>
</Columns>
</asp:GridView>
</div>
</form>
这需要JavaScript吗?
答案 0 :(得分:0)
您可以试试这个,但首先您需要确定要隐藏的行。
trace add variable arrayA {array write unset} {arrayOrder arrayA_order}