Forum Discussion

주현 김's avatar
주현 김
Iron Contributor
Aug 19, 2016

Column width resize in modern list

I am using modern list, and it is truly great, very well designed.

 

Anyway, I am using 6~7 columns, and "title" column's width is unnecessarily long, thus i have to scroll right to see entire columns.

 

I've tried resize title column's width and saved it, but when I go back and come again, width sizing is not saved.

 

Is there any way to save this resized width or setting defalut width of columns?

63 Replies

  • Marcel Bouvrie's avatar
    Marcel Bouvrie
    Copper Contributor

    Really important to (re-)style columns/views. Because the current styling is creating unwanted behaviours. Btw an option todo a css overwrite in general would be great, then we don't have to wait all this time...

  • Colin Miller's avatar
    Colin Miller
    Copper Contributor

    Hard to understand the logic behind this. Re-sizable columns seems... obvious. At the moment I'm stuck with truncated columns in web parts on a Communication Site. It's contrary to years of best practice, why has MS stuck their heels in the ground on this one?

    • Rachael Preston's avatar
      Rachael Preston
      Copper Contributor

      Its quite absurd that Microsoft continues to push out products that have many commonly used features and tools missing. Or they make tasks so time consuming to perform. Who really wants to spend countless hours learning and writing scripts? Its like we are stepping back in time, gone are the days of using a GUI to do simple tasks. If it wasn't for CRM and ERP systems that only runs on Windows I would propose the company I work for to swift over to Linux or Mac.

      • Tracy Pierson's avatar
        Tracy Pierson
        Copper Contributor
        Am I to understand that I cannot make a SharePoint column wider using JSON? Is that why I have wasted so much time looking for examples?
  • Scott Wolfe's avatar
    Scott Wolfe
    Copper Contributor

    Agree, this is an issue and makes using modern list view very challenging.   I am having to force users to classic view as a work-around.  

    • Matthew Jones's avatar
      Matthew Jones
      Brass Contributor

      I also agree with the above comments.

       

      Not having the columns resize to fir the browser window seems such an oversight!

       

      Please Microsoft - get these little things right.

  • Ben Girard's avatar
    Ben Girard
    Brass Contributor

    This problem is truly unacceptable....and makes moder list unusable.  :(

     

    For example, I have a a short primary title column label (just a few letters).  My items also have very few letters but the default width of that column is 5X too wide. :(    Furthermore, the column width is not saved for viewers.

     

    This problem has been around since day one...  Please FIX asap.

    • Cy Marven's avatar
      Cy Marven
      Brass Contributor

      A work around. If you choose multiple lines of text, then choose 1 the column shrinks. Not perfect but better. The idea of having to use java, css or any code just to change a column width is ridiculous. Please sort this so ordinary non developer types can change widths easily.  If sharepoint is truly going to appeal to the massess it must get easier to do the basics!

      • KenJohnson2's avatar
        KenJohnson2
        Brass Contributor

        I've had the same problem with column width in modern lists since day 1. However, I saw today that "Column Formatting" would be rolling out to Office 365 customers next month. I don't know if it will let me control the width of the first column, but I'm going to give it a try when it rolls out to my tenant. https://support.office.com/en-us/article/Column-formatting-1f927342-2bed-4745-b727-ff8b7ff96b22?ui=en-US&rs=en-US&ad=US 

        If it works I'll report back to this thread.

  • Juhyun Kim : Each column will auto resized based on css , it is designed like that. Add a Content Editor Web Part in your page and modify the core CSS file.

    <style type='text/css'>
    .ms-vh-div[DisplayName='<ColumnName>']
    {
    width:____px;
    }
    </style>

    Use developer tool to check the exact css file

    • Jodybotha's avatar
      Jodybotha
      Copper Contributor

      Come on! This is a simple request!!

    • Žilvinas Jonaitis's avatar
      Žilvinas Jonaitis
      Copper Contributor
      Great! That works for me for all columns on the list except the first one with items with ellipsis (...). However, the first column width shrinks as other columns width increases, so it's a kind of work around.
    • 주현 김's avatar
      주현 김
      Iron Contributor

      Thanks. But it seems your solution only can be applied in web part.

       

      I was talking, sharepoint modern list page.

       

      I do not see css editing option in modern list page.

       

      Please look for attached screenshot.

      • Rajesh Sitaraman's avatar
        Rajesh Sitaraman
        Brass Contributor

        If you are using Classic sites + Modern List, then you can either try with some script in Master Page (Not recommeded)or Custom Action with script block to change the width. CEWP/Script editor approach wont work, you cannot add webpart to the modern list page. I said try, because the modern list is rendered through React DOM, finding the post render state is really hard. 

         

        If you are Modern team site + Modern List, there is no option to adding any script through Master page or Custom action.

Resources