View Full Version : asp:gridview select/deselect row styling issue

04-11-2011, 09:12 PM
I'm new to ASP, so sorry for sounding like a noob, but I really appreciate any help I can get while I'm learning!

I'm trying to style an asp:gridview, and it looks good so far until you click a row; then the row loses its style and doesn't regain it after clicking a new row.

Here's the code I'm using for the gridview:

<asp:GridView ID="gvBuyer" runat="server" OnRowDataBound="gvBuyer_RowDataBound" ClientIDMode="AutoID"
Width="100%" AllowPaging="true" AllowSorting="true" PageSize="20">
<HeaderStyle CssClass="largeGrid_header" />
<RowStyle CssClass="gridRow" />
<SelectedRowStyle CssClass="gridRow_alt" />
<EditRowStyle CssClass="gridRow" />
<AlternatingRowStyle CssClass="gridRow_alt" />
<asp:BoundField DataField="FirstName" HeaderText="First Name" />
<asp:BoundField DataField="LastName" HeaderText="Last Name" />
<asp:BoundField DataField="Email" HeaderText="Email" />
<asp:BoundField DataField="Phone" HeaderText="Phone" />
<asp:BoundField DataField="Status" HeaderText="Status" />
<asp:BoundField DataField="MemberSince" HeaderText="Member Since" DataFormatString="{0:D}" />

Thanks again and mucho appreciation!