Here is the code from the .aspx page for the gridview
<asp:GridView ID="gvManagement" runat="server" CssClass="gridstyle" AlternatingRowStyle-CssClass="altrow"
DataSourceID="" AutoGenerateColumns="False" OnRowDataBound="gvManagement_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnEdit" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit" />
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton ID="btnUpdate" runat="server" CommandName="Update" Text="Update"/>
<asp:LinkButton ID="btnCancel" runat="server" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnDelete" runat="server" CausesValidation="false" CommandName="Delete" Text="Delete" />
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ID" ReadOnly="true" HeaderText="ID"/>
<asp:BoundField DataField="Sequence" ReadOnly="true" HeaderText="Sequence"/>
<asp:BoundField DataField="Name" ReadOnly="true" HeaderText="Name" />
<asp:BoundField DataField="Title" ReadOnly="true" HeaderText="Title" />
<asp:BoundField DataField="Division" ReadOnly="true" HeaderText="Division Name" />
<asp:BoundField DataField="MailDrop" ReadOnly="true" HeaderText="Mail Drop" />
<asp:BoundField DataField="Phone" ReadOnly="true" HeaderText="Telephone Number" />
<asp:TemplateField HeaderText="Bold" >
<ItemTemplate>
<%# Eval("IsBold")%>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="chkBoxBold" runat="server" Width="20px" Text='<%# Eval("IsBold")%>'/>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
...and here is the RowDataBound event from the code behind.
Protected Sub gvManagement_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvManagement.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.Cells(9).Text = "Y" Then
e.Row.Font.Bold = True
End If
End If
End Sub

New Topic/Question
Reply



MultiQuote



|