I would like to change the text on a particular table header in a Layout Template in a ListView programmatically (depending on the value in the database). It works but the styling is no longer using the LinkButton styling(green and clickable). Instead it's black and bold (not clickable)
I used the following (Access "th" in Listview):
My c#:
HtmlTableCell thCustCol = lstAuthorizations.FindControl("customColumn") as HtmlTableCell;
thCustCol.InnerText = query.Select(x => x.Custom1).First().ToString();
I also tried applying FindControl to "LinkButton10" instead, but then it had an (null reference)exception.
My aspx:
<LayoutTemplate>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th runat="server" id="customColumn"><asp:LinkButton id="LinkButton10" runat="server" CommandArgument="Custom1" CommandName="Sort">Group ID</asp:LinkButton></th>
It looks like this:
The "1000" is a tableheader, but should be a green LinkButton like "Member Name"
What am I missing?