更改gridview的边框颜色

Joh*_*ohn 2 asp.net gridview colors

使用Gridview显示存储在DB中的表,我想将边框颜色更改为#dbddff.它不会接受这个或dbddff,我该怎么办?

<asp:GridView ID="GridView1" runat="server" AllowPaging="true" BorderColor="dbddff" AllowSoerting="true" Width="100px"  AutoGenerateColumns="false" DataSourceID="GridDataSource"> 
Run Code Online (Sandbox Code Playgroud)

谢谢

小智 7

尝试将BorderWidth属性设置为1px.

<asp:GridView ID="GridView1" runat="server" AllowPaging="true" BorderWidth="1px" BorderColor="dbddff"  AllowSoerting="true" Width="100px"  AutoGenerateColumns="false" DataSourceID="GridDataSource"> 
Run Code Online (Sandbox Code Playgroud)