<asp:Panel ID="Panel1" runat="server" Height="390px">
<asp:GridView ID="GridView1" runat="server" PageSize="3" AutoGenerateColumns="False" DataKeyNames="guojiaID" DataSourceID="SqlDSguojia" Height="344px" Width="510px" CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" >
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="guojiaID" HeaderText="guojiaID" ReadOnly="True" SortExpression="guojiaID" InsertVisible="False" Visible="False" />
<asp:ImageField DataImageUrlField="tupian" FooterText="国家图片" HeaderText="国家图片" >
</asp:ImageField>
<asp:BoundField DataField="guojiaming" HeaderText="国家名" SortExpression="guojiaming" > </asp:BoundField>
<asp:BoundField DataField="xuezhi" HeaderText="学制" SortExpression="xuezhi" />
<asp:BoundField DataField="shenghuofei" HeaderText="生活费" SortExpression="shenghuofei" />
<asp:BoundField DataField="shenqingyaoqiu" HeaderText="申请要求" SortExpression="shenqingyaoqiu" />
<asp:BoundField DataField="biyesheng" HeaderText="毕业生" SortExpression="biyesheng" Visible="False" />
<asp:BoundField DataField="liuxuefeiyong" HeaderText="学费" SortExpression="liuxuefeiyong" />
<asp:ImageField DataImageUrlField="biyesheng" FooterText="毕业生" HeaderText="毕业生">
</asp:ImageField>
</Columns>
<FooterStyle BackColor="#CCCC99" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FBFBF2" />
<SortedAscendingHeaderStyle BackColor="#848384" />
<SortedDescendingCellStyle BackColor="#EAEAD3" />
<SortedDescendingHeaderStyle BackColor="#575357" />
</asp:GridView>
想知道怎么回事,我用ItemStyle、HeadStyle都试过了没用 还有用 css'也不能控制。
(我用的是vs2017)
<asp:GridView ID="GridView1" runat="server" PageSize="3" AutoGenerateColumns="False" DataKeyNames="guojiaID" DataSourceID="SqlDSguojia" Height="344px" Width="510px" CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" >
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="guojiaID" HeaderText="guojiaID" ReadOnly="True" SortExpression="guojiaID" InsertVisible="False" Visible="False" />
<asp:ImageField DataImageUrlField="tupian" FooterText="国家图片" HeaderText="国家图片" >
</asp:ImageField>
<asp:BoundField DataField="guojiaming" HeaderText="国家名" SortExpression="guojiaming" > </asp:BoundField>
<asp:BoundField DataField="xuezhi" HeaderText="学制" SortExpression="xuezhi" />
<asp:BoundField DataField="shenghuofei" HeaderText="生活费" SortExpression="shenghuofei" />
<asp:BoundField DataField="shenqingyaoqiu" HeaderText="申请要求" SortExpression="shenqingyaoqiu" />
<asp:BoundField DataField="biyesheng" HeaderText="毕业生" SortExpression="biyesheng" Visible="False" />
<asp:BoundField DataField="liuxuefeiyong" HeaderText="学费" SortExpression="liuxuefeiyong" />
<asp:ImageField DataImageUrlField="biyesheng" FooterText="毕业生" HeaderText="毕业生">
</asp:ImageField>
</Columns>
<FooterStyle BackColor="#CCCC99" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FBFBF2" />
<SortedAscendingHeaderStyle BackColor="#848384" />
<SortedDescendingCellStyle BackColor="#EAEAD3" />
<SortedDescendingHeaderStyle BackColor="#575357" />
</asp:GridView>
想知道怎么回事,我用ItemStyle、HeadStyle都试过了没用 还有用 css'也不能控制。
(我用的是vs2017)