如何更改 SharePoint 列表视图中列的宽度?
我有 SharePoint 2007,并且有一个列表视图,其中有一个文本字段,当与相当多的其他字段一起显示时,该文本字段的宽度仅为大约 1 个字。
有没有办法在不使用 css 或其他 Web 编程语言的情况下扩展该列?
I have SharePoint 2007 and I have a list view that has a text field that, when shown with quite a few other fields, is only about 1 word narrow.
Is there a way to expand that column without access to css or other web programming languages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您无法使用 CSS、JavaScript、SharePoint Designer 或将任何 C# 代码部署到服务器......那么您就无法更改列的宽度。
If you can't use CSS, JavaScript, SharePoint Designer, or deploy any C# code to the server.. then you can't change the width of the column.
尝试添加带有 CSS/JavaScript 的 ContentEditor Web 部件来设置列的外观。您不需要 C# 或 Designer。
我对搜索页面做了类似的事情,我需要触发 JavaScript 函数,因此我使用以下代码向页面添加了 CEWP(见下文)。
您可以更改此设置以查找要修改的列的 ID。请记住,SharePoint 中的控件 ID 是在页面呈现期间生成的,因此您不一定知道确切的 ID。这就是为什么此代码查找 ID 以“_PSB_Show”结尾的锚点,而不是查找确切的 ID。
Try adding a ContentEditor Web Part with the CSS/JavaScript that sets the look of the column. You don't need C# or Designer.
I did something similar with a search page where I needed a JavaScript function to be triggered so I added a CEWP to the page with the following code (see below).
You could change this to look for the id of the column you want to modify. Just remember that ID's of controls in SharePoint are generated during the page render so you won't necessarily know the exact ID. That is why this code looks for an anchor with an ID that ends with '_PSB_Show', instead of looking for the exact ID.