I am using a GridView in asp.net.
The first column is a list of button controls -
<ItemTemplate>
<asp:Button ID="statusButton" runat="server" Text="Select"
OnClick="statusButton_CheckedChanged" />
</ItemTemplate>
However I want to modify the background color and Text values of this button on data bind based on the value of another column in the table.
My problem being I need to check the values of the other column as they are retrieved, they will either be 1 or -1 and that value will set the design of the button.
How can I check the values of this bound field -
<asp:BoundField DataField="EXCLUDE" HeaderText="EXCLUDE" SortExpression="EXCLUDE"
ReadOnly="True" HeaderStyle-CssClass = "hideGridColumn"
ItemStyle-CssClass="hideGridColumn"/>
To then set the colour and text of the button?