【发布时间】:2026-01-30 02:40:01
【问题描述】:
听说我发布了我的网格视图。
<Columns>
<asp:TemplateField HeaderText="Item">
<ItemTemplate>
<p> <asp:Label ID="lblproductname" display="Dynamic" runat="server" Text='<%# Bind("productname") %>'></asp:Label></p>
<p><asp:Label ID="lblProductWeight" display="Dynamic" runat="server" Text='<%# Bind("groupvalue") %>'></asp:Label></p>
<p> <asp:Label ID="lblProductType" display="Dynamic" runat="server" Text='<%# Bind("groupname") %>'></asp:Label></p>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField DataField="Quantity" HeaderText="Qty">
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Price" HeaderText="Price">
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="SubTotal" HeaderText="Sub Total">
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
</Columns>
<FooterStyle CssClass="datatable" />
</asp:GridView>
那么如何在 xyz 方法中以编程方式使标签的可见 false ItemTemplate
【问题讨论】:
-
我不确定这是否正确,所以不想编辑问题,但我相信问题是:“如何更改
ItemTemplate中的三个标签可见性?”