【问题标题】:How to make GridView ASP.NET control look like SharePoint List?如何使 GridView ASP.NET 控件看起来像 SharePoint 列表?
【发布时间】:2014-01-10 13:43:42
【问题描述】:

我一直在开发 SharePoint WebPart。在这个 webpart 中有一个 gridview 用来显示一些信息。

由于业务需要,我需要为此网格视图提供 SharePoint 列表的外观。

有没有人拥有使GridView ASP.Net 控件看起来像SharePoint 列表的样式?

【问题讨论】:

    标签: asp.net css sharepoint-2010 styling


    【解决方案1】:

    对于 Sharepoint 服务器控件 SPGridView,所有 css 类都已包含在 here 您可以找到如何使用它。

    对于 ASP.NET GridView 控件,您可以尝试下面的示例

    <asp:GridView runat="server" CssClass="ms-listviewtable">
        <HeaderRow CssClass="ms-viewheadertr ms-vhltr"/>
        <HeaderStyle CssClass="ms-vh2" />
        <RowStyle BackColor="ms-itmhover" />
        <AlternatingRowStyle CssClass="ms-alternating ms-itmhover" />
        <ControlStyle CssClass="ms-vb-title"/>
    </asp:GridView>
    

    【讨论】:

    • 谢谢,帮了大忙
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-04-10
    • 1970-01-01
    • 2010-09-05
    • 1970-01-01
    • 2011-11-15
    • 2018-08-31
    • 2011-04-27
    相关资源
    最近更新 更多