简体   繁体   English

在线Sharepoint:将列表显示为.aspx网站的一部分

[英]Sharepoint Online: Show List as part of the .aspx site

What are the possibilities to show a list as a part of a .aspx site? 将列表显示为.aspx网站的一部分有哪些可能性? I need this to show two different lists on one page. 我需要它在一页上显示两个不同的列表。 It would also be optimal if the standard list functions like sorting etc. would still be available. 如果标准列表功能(如排序等)仍然可用,那将是最佳选择。

Is there a way to show the "native" Sharepoint List as en embedded part of the web site? 有没有办法将“本地”共享点列表显示为网站的嵌入式部分?

I already tried out to show the list data via GridView. 我已经尝试过通过GridView显示列表数据。 But this has the disadvantage that I can't sort the list anymore. 但这有一个缺点,就是我无法对列表进行排序。

Can someone help? 有人可以帮忙吗? Important: I need to use the client object model! 重要:我需要使用客户端对象模型! I need a solution for Visual Studio projects! 我需要针对Visual Studio项目的解决方案!

You can try to integrate a list (app) as described in the OOTB part of this answer by adding it directly onto the .aspx page 您可以尝试将列表(应用程序)直接添加到.aspx页面,如此答案的OOTB部分所述,将其集成

Working with web parts within a SharePoint app by Chris O'brian Chris O'brian 在SharePoint应用程序中使用Web部件

Adding a list view to SharePoint 2013 app pages in short: 简而言之, 将列表视图添加到SharePoint 2013应用程序页面

<WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="full" Title="loc:full" >
    <WebPartPages:XsltListViewWebPart ID="XsltListViewWebPart2" runat="server" ListUrl="Lists/[URL of the list]" IsIncluded="True" NoDefaultStyle="TRUE" Title="Images used in switcher" PageType="PAGE_NORMALVIEW" Default="False" ViewContentTypeId="0x">
    </WebPartPages:XsltListViewWebPart>
</WebPartPages:WebPartZone>

The OOTB way OOTB方式

Use the List View WebPart as described here List View Web Part . 这里描述使用列表视图Web部件列表视图Web部件 This is out of the box with also the default functionality of a sharepoint list. 开箱即用,还有共享点列表的默认功能。

1) Go to a list where you want to have the lists 1)转到要包含列表的列表
2) Edit Page 2)编辑页面
3) Click on the Insert Tab and select WebPart 3)单击“插入”选项卡,然后选择“ WebPart”
4) Select Apps in Categories 4)在类别中选择应用
5) Select the list you want to add to the page on the right list 5)选择要添加到右侧列表页面的列表
6) Save the page 6)保存页面

SPGridView SPGridView

You can also use the SPGridView to display the Listitems. 您还可以使用SPGridView显示Listitems。 But in this ase you have to implement the out of the features like sorting, filtering etc. 但是在这种情况下,您必须实现排序,过滤等功能。

Create a Grid by HTML 通过HTML创建网格

You can also render the contents of a list by using default HTML tables. 您还可以使用默认的HTML表来呈现列表的内容。 This is not a so fine way, but you also need to implement here manually all the thing like sorting etc. 这不是一个很好的方法,但是您还需要在此处手动实现所有操作,例如排序等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM