I have an item template in a grid view:
<asp:TemplateField HeaderText="Name" SortExpression="GroupDescription">
<ItemTemplate>
<asp:Label ID="lblName" CssClass="edit" runat="server" Text='<%# Bind("GroupDescription") %>'></asp:Label>
<asp:HiddenField ID="lblHidden" EnableViewState="false" runat="server" />
</ItemTemplate>
</asp:TemplateField>
The CssClass is ‘edit’. If the GroupDescription is default then there should be no css class. Is there some way to do this?
Thanks
You can change the class within the ItemDataBound event of the repeater: