0

I have use the default view for my SharePoint 2013 issue tracking list , as follow:-

enter image description here

But is there a way to make the “Description" field size larger ? I know this field will expand automatically , but the idea is that I want it to have a fixed size and to expand horizontally at least double the current area ?

3

Since a view for Issue Tracking list is rendered as a table you could use the CSS to define column width, for example:

tr.ms-viewheadertr th:nth-child(5) {
    min-width: 200px;
}

Note: The column is selected by its index using :nth-child

Result

enter image description here

Probably the easiest way to apply the changes would be to insert the specified CSS (do not forget enclose it using style tag) on the page using Content Editor or Script Editor web parts.

  • thanks for the help it worked well, but can i ask you if modifying the view in this way can be overridden by any future update to SharePoint ? or this can not be overridden by any update, and it is a safe way to modify the list view layout? – john Gu Nov 5 '14 at 23:20
  • 1
    If by future update you mean Cummulative Updates and Service Packs then yes, it will not affect the customized view – Vadim Gremyachev Nov 5 '14 at 23:33
  • I have another minor comment, after i added the <style> i have noted that the "Item " & "List" tabs will be hidden, till the user select at-least one item.. if i remove the Script Editor which contains the <style>, then the "item" & "List" tabs are going to be displayed again when the use visit the page... can you advice on this please? – john Gu Nov 6 '14 at 0:02
1

You should edit the list view webpart in SharePoint Designer 2013.

Then click on Customize XSLT

Search in the code for

<xsl:template name="FieldRef_header.Description" ddwrt:dvt_mode="header" match="FieldRef[@Name='Description']" mode="header" ddwrt:ghost="hide">
<th nowrap="nowrap" scope="col" onmouseover="OnChildColumn(this)">
<xsl:attribute name="class">

Now, I change the code:

<th nowrap="nowrap" scope="col" onmouseover="OnChildColumn(this)">

To

<th scope="col" onmouseover="OnChildColumn(this)" style ="width: 350px; white-space:normal;min-width:350px">

https://social.technet.microsoft.com/Forums/en-US/8b8e2f14-81ab-4d57-808b-d452001e0ccf/how-to-increase-width-of-a-list-in-sharepoint-designer-2013

  • can you advice please from where i can access this code ? – john Gu Nov 6 '14 at 0:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.