我有SharePoint 2007,而且我有一個列表視圖,它有一個文本字段,當顯示其他字段時,它只有大約1個字。如何更改列表視圖中列的寬度是SharePoint?
有沒有辦法在不訪問css或其他網絡編程語言的情況下擴展該列?
我有SharePoint 2007,而且我有一個列表視圖,它有一個文本字段,當顯示其他字段時,它只有大約1個字。如何更改列表視圖中列的寬度是SharePoint?
有沒有辦法在不訪問css或其他網絡編程語言的情況下擴展該列?
如果您不能使用CSS,JavaScript,SharePoint Designer或將任何C#代碼部署到服務器,那麼您無法更改該列的寬度。
大鼠........ 80( – Keng 2010-11-15 17:10:08
嘗試使用設置列外觀的CSS/JavaScript添加ContentEditor Web部件。您不需要C#或Designer。
我做了一些類似的搜索頁面,我需要一個JavaScript函數來觸發,所以我用下面的代碼在頁面中添加了一個CEWP(見下面)。
您可以將其更改爲查找要修改的列的ID。請記住,SharePoint中控件的ID是在頁面呈現過程中生成的,因此您不一定知道確切的ID。這就是爲什麼此代碼查找以'_PSB_Show'結尾的ID,而不是查找確切的ID。
<script type="text/javascript">
var anchors = document.getElementsByTagName("a");
var anchor;
var j;
// Iterate through all anchors on the page and find the one with ID ending in _PSB_Show
for (j = 0; j < anchors.length; j++)
{
if (anchors[j].id.match(/\_PSB_Show$/) != null)
{
anchor = anchors[j];
break;
}
}
// If the anchor is found and the click is supported in the current browser
// Perform a click after 100 ms
if ((anchor != null) && (anchor.click != null))
{
setTimeout("anchor.click();", 100);
}
</script>
爲什麼不能訪問CSS或JavaScript?你有權訪問SharePoint設計器嗎? – 2010-11-15 17:00:01
@Kit Menke Nope。 [關於MIS部門的評論]。這就是我所要說的。 ; 0) – Keng 2010-11-15 17:02:17
CSS/JavaScript怎麼樣?你可以將C#代碼部署到服務器嗎? – 2010-11-15 17:03:49