Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/265.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP.NET/GridView:HeaderStyle CssClass无效_C#_Asp.net_Css_Gridview - Fatal编程技术网

C# ASP.NET/GridView:HeaderStyle CssClass无效

C# ASP.NET/GridView:HeaderStyle CssClass无效,c#,asp.net,css,gridview,C#,Asp.net,Css,Gridview,我在ASP.NET 3.5中有以下GridView: <asp:GridView ID="gvTable" runat="server" AllowSorting="true" ShowHeader="true"> <Columns> <asp:BoundField DataField="ActivityDate" HeaderText="Date" HeaderStyle-CssClass="date" /> <asp:

我在ASP.NET 3.5中有以下GridView:

<asp:GridView ID="gvTable" runat="server" AllowSorting="true" ShowHeader="true">
  <Columns>
    <asp:BoundField DataField="ActivityDate" HeaderText="Date"
      HeaderStyle-CssClass="date" />
    <asp:BoundField DataField="ActivityType" HeaderText="Type" />
    <asp:BoundField DataField="ActivityNotes" HeaderText="Notes" />
  </Columns>
  <PagerSettings Position="Bottom" Mode="NextPrevious" PageButtonCount="5"
    PreviousPageText="Older activities" NextPageText="Newer activities" />
</asp:GridView>

问题是我使用的是过时版本的CSS友好控制适配器。下载了最新的源代码,经过编译,使用了新的DLL和.browser文件,并修复了它。

您的CSS是如何定义的?@Shawn:什么意思?(我不知道这有什么关系?)css类中的“日期”是什么?它可能会给我们一个线索,为什么它不工作。它只有一个宽度设置。我知道它是有效的,因为我在我当前的静态表中使用它。你还有什么可以覆盖你的css的吗?为通用th或td元素设置了什么?
<thead>
  <tr>
    <th scope="col"> <!-- No class :( -->
      Date
    </th>
    ...
  </tr>
</thead>