0

I have a list where some field take many line
enter image description here

As you see, some fields (ex, "Titre") take many line (here 5).
How can I increase the size of the column width to make it on only one line for each element ?
I'm a new user of SharePoint 2013 (3 weeks), and I don't have SP Designer and InfoPath, so I'm looking for a solution without that. I heard you can use the Script Editor web part, but I don;t know how.

I appreciate if you could share your experience.

0

You should make use of SharePoint Client Side Rendering mechanism.

http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views

Using CSR techniques, create a JS file and place it in a library (SiteAssets or Style Library)

Edit the page using Site Actions button (Gear icon). Then choose the web-part properties. Here you can provide link to the JS file.

1
  • Thank you for the link, it will be usefull. Unfortunately, I never learn JavaScript, so I can't test your method right now. But I'll try to learn a little the langage, and then I'll test it Apr 18 '16 at 11:17
0

I have two suggestions:
- I suggest you to install SharePoint designer 2013 link: SharePoint designer 2013 Download which you will need specially for workflows and editing views and codes.
- it is very use full if you learn CSS and HTML even the bases. It will be needed in the future.
About your question my experience was that there is no way to make the column with wider except with limiting list view columns but you can make the hight shorter with the code bellow:

<style>
   .ms-vb2  .ms-rtestate-field{
        max-width:250px;
        max-height:38px;
        overflow:hidden;
    }
    .ms-vb2  .ms-rtestate-field:hover{
        max-height:none;
    }​

</style>

- Go to edit mode in the view that you need the code(each view is seprate page so the code works for one page)
- Edit Page Add web part in Media and content folder call : Script editor
- Edit web part and paste the above script in there. - Save the script and save the page.
- The result would be you make the column hight shorter but when you hover the field you can see the whole content.
If you need to add the height just change the number of max-heigh

2
  • Thanks ! I can't install SP Designer (the administrator of the company where I make my internship doesn't want it, and we use a third party software :) ), and I already know CSS and HTML(even if I didn't used it for some time), but I don't know how to edit list in Sherepoint with it. I tried your script, but nothing change =/ Apr 18 '16 at 7:57
  • But this will only work if you have added a list to a page, right? Where do I put the code for lists and libraries itself (not on pages)?
    – MrCalvin
    Feb 17 '17 at 21:12

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.