I have a gridview control where the last control is a hyperlink that allows someone to select that link and sign up for a class:
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="4" ForeColor="#333333"
GridLines="None">
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="eventAuid" HeaderText="eventAuid" ReadOnly="True" SortExpression="eventAuid"
InsertVisible="False" Visible="False" />
<asp:BoundField DataField="eventOccurrencesAuid" HeaderText="eventOccurrencesAuid"
SortExpression="eventOccurrencesAuid" InsertVisible="False" ReadOnly="True" Visible="False" />
<asp:BoundField DataField="dayOfWeek" HeaderText="Day Of Week" SortExpression="dayOfWeek"
ReadOnly="True" />
<asp:BoundField DataField="startDateTime" HeaderText="Start Date/Time" SortExpression="startDateTime" />
<asp:BoundField DataField="endDateTime" HeaderText="End Date/Time" SortExpression="endDateTime" />
<asp:BoundField DataField="location" HeaderText="Location"
SortExpression="location" />
<asp:BoundField DataField="remainingSpots" HeaderText="Remaining Spots" SortExpression="remainingSpots">
</asp:BoundField>
<asp:HyperLinkField DataNavigateUrlFields="eventAuid,eventOccurrencesAuid"
DataNavigateUrlFormatString="SignUpForAnEventOccurrence.aspx?eventAuid={0}&eventOccurrencesAuid={1}"
Text="Sign up" />
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
What I need to do is once the remaining spots in the gridview in each row is 0, then I need to change that hyperlink to Class Full and not allow anyone to click on it. Any ideas what I can do? I know that I would have to do it in the code behind which I would use C#, but I do not know how. Please help.
Thanks,
Jess