1
我有一個gridview,有一對BoundFields
英寸。我想要做的是一旦選中(或取消選中)特定複選框<asp:CheckBox ID="chkShowExtra" runat="server" AutoPostBack="True" oncheckedchanged="chkShowExtra_CheckedChanged" Text="Show extra details" Checked="False" />
它應該切換幾個BoundFields
的可見性。 我該如何做到這一點?在CheckedChanged事件中切換綁定域的可見性
<asp:BoundField DataField="CUS_DatabaseEdition" DataFormatString="" HeaderText="Edition" SortExpression="CUS_DatabaseEdition" Visible="false" />
<asp:BoundField DataField="Offices" HeaderText="O" SortExpression="Offices" Visible="false">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="CUS_CustomerQuantity" HeaderText="Q" SortExpression="CUS_CustomerQuantity" Visible="false">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
我也發現這個事件,我認爲它會派上用場。
protected void chkShowExtra_CheckedChanged(object sender, EventArgs e)
{
}
謝謝你的幫忙!