asp:BoundField view the values with a condition
问题 i have a dataview with: <asp:BoundField DataField="AccontoAutorizzato" HeaderText="Acconto Aut." SortExpression="AccontoAutorizzato" dataformatstring="{0:C}" /> is possible hide the values of each with a condition like Visible=<%# ((Int32)Eval("StatoID") < 2) %> ? Thanks 回答1: It's possible with following <asp:TemplateField HeaderText="Acconto Aut." > <ItemTemplate> <asp:Label ID="lbl" runat="server" Text='<%# Bind"AccontoAutorizzato") %>' Visible='<%# ((int)(Eval("StatoID")) < 2) %>' /> <