-1
異なる単一のトグルボタンを使用して特定の行をグリッド表示で表示/非表示するにはどうすればよいですか?たとえば、ボタンをクリックすると、グリッドビューの3番目の行が非表示になり、再度クリックするとその行が表示されます。ここで異なるボタンを使用して特定の行をグリッド表示で非表示にする
私の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を必要でしょうか?
こんにちは、これはボタンごとのコードですか? – kelvin
それぞれのボタンでグリッドビューをバインドすることができます。そこで、GridView1_RowDataBoundを呼び出すことで、そこにテキストをフィルタすることができます。 – Ravikumar
こんにちは、これは、あなたはlblBalanceAmountを取得しましたか? – kelvin