简体   繁体   English

Sharepoint 2010:如何动态更改Web部件中列表的视图

[英]Sharepoint 2010: How to dynamically change the view of a list in a web part

I have a page with a list of companies and a list of related data. 我有一个页面,其中包含公司列表和相关数据列表。 I can connect the lists so that when I select a company, I only see that company's related data. 我可以连接列表,以便在选择公司时仅看到该公司的相关数据。 Fine. 精细。 However I now need to also change the view of the list of related data. 但是,我现在还需要更改相关数据列表的视图。 eg "Company1" has view "Company1" with one set of columns and filtering, "Company2" has view "Company2" with another set of columns and filtering, etc. 例如,“ Company1”的视图“ Company1”具有一组列和过滤,“ Company2”的视图“ Company2”具有另一组列和过滤,等等。

I don't believe this is possible using standard page editing, so customisation is required. 我认为使用标准页面编辑是不可能的,因此需要自定义。 I haven't got access to the server, so I would prefer a JavaScript solution to this if possible. 我没有访问服务器的权限,因此,如果可能的话,我希望使用JavaScript解决方案。

Thanks in advance. 提前致谢。

Why not just setup three pages, with each correct view inserted into the page. 为什么不只设置三个页面,并将每个正确的视图插入页面。 then from you menu just select the pages, Company 1 View Company 2 View etc. Nothing complicated 然后从菜单中选择页面,即Company 1 View Company 2 View等。没有什么复杂的

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

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