Javascript更改ListView Web部件中的关联列表 [英] Javascript change the associated list in listview web part
问题描述
我有多个列表,每个列表根据部门具有唯一的列表级别权限.我使用客户端输入表单来收集所需的数据,然后根据当前用户的权限组将该项目保存到适当的列表中.效果很好.
I have multiple lists where each have unique list level permissions based on departments. I use a client side input form to collect required data and save the item to the appropriate list based on the current user's permission group. This works pretty good.
我希望在输入页面上有一个listview Web部件,但是它需要根据登录的用户是动态的.更具体地说,要基于用户的组.
I would like to have a listview web part on the input page but it needs to be dynamic based on which user is logged in. More specifically based on the user's group.
我无法弄清楚如何动态更改listvew Web部件的关联列表,以便用户可以看到他们的条目已被记录.
I cannot figure out how to dynamically change a listvew web part's associated list so the user can see that their entry has been recorded.
之所以选择此配置,是因为每个列表的唯一权限限制为50K.在归档项目之前,这些列表很容易每个都有25万个项目. (我知道,带有DMS的自定义应用程序会是更好的选择,但客户端资源有限 且已经部署了SP).
This configuration was selected because of the 50K item limit on unique permissions per list. These lists could easily have 250K items each before archiving items. (I know, a custom app with an DMS would be a better option but the client has limited resources with SP already deployed).
有什么建议吗?
我知道随着项目的成功添加,我可以动态地制作一个HTML表,但是它不会像listview Web部件所提供的那样有用.
I know I could dynamically make an HTML table as items are successfully added but it would not be as useful as what a listview web part provides.
推荐答案
据我所知,除非您可以编辑Web部件的xml并动态更改GUID,否则不可能通过JavaScript来实现.
Per my knowledge, it is impossible to achieve this by JavaScript unless you can edit the xml for the web part and change the GUID dynamically.
正如您提到的,我认为最好的方法是动态创建HTML表.
As you mentioned, i think the best way is to make an HTML table dynamically.
最诚挚的问候,
李刘
这篇关于Javascript更改ListView Web部件中的关联列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!