突出显示Gridview选中的行asp.net (visual studio 2012)
本文关键字:net visual studio 2012 asp 显示 Gridview | 更新日期: 2023-09-27 17:50:20
如何在asp.net (visual studio 2012)中突出显示选定的gridview行
这是我的。aspx代码
<asp:GridView ID="LessonsGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="swim_ID,Expr2,fac_ID" DataSourceID="LessonsDataSource" AllowSorting="True" Width="1050px">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="swim_ID" HeaderText="Class ID" ReadOnly="True" SortExpression="swim_ID" />
<asp:BoundField DataField="swim_Start" HeaderText="Start Date" SortExpression="swim_Start" />
<asp:BoundField DataField="swim_Num_Classes" HeaderText="Lessons" SortExpression="swim_Num_Classes" />
<asp:BoundField DataField="fac_Street" HeaderText="Street" SortExpression="fac_Street" />
<asp:BoundField DataField="fac_City" HeaderText="City" SortExpression="fac_City" />
<asp:BoundField DataField="lev_Name" HeaderText="Level" SortExpression="lev_Name" />
<asp:BoundField DataField="lev_Cost" HeaderText="Cost" SortExpression="lev_Cost" />
<asp:BoundField DataField="lev_Max_Enroll" HeaderText="Max Space" SortExpression="lev_Max_Enroll" />
<asp:BoundField DataField="lev_Min_Age" HeaderText="Min Age" SortExpression="lev_Min_Age" />
<asp:BoundField DataField="lev_Max_Age" HeaderText="Max Age" SortExpression="lev_Max_Age" />
</Columns>
figure it out
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />