Change/Remove default text when lists are empty

Hi,

How do you change or remove the default text like "There are no items to show in this view of the "Documents" document library. To create a new item, click "New" or "Upload" above."?

This text displays when a list or library is empty and is a default out-of-the-box behaviour.

Regards,
Jeremy

March 11th, 2011 12:00pm

Hi Jeremy,

Like you said, it's a default out of the box behaviour. You can create a data view of that list/document library using SharePoint Designer. In that dataview, you have the ability to show whatever you want when the list/library is empty.

 

Free Windows Admin Tool Kit Click here and download it now
March 12th, 2011 5:26pm

Hi Jeremy,

 

you can do this by adding a script in a content editor webpart.

Check my post @ http://chanakyajayabalan.wordpress.com/2010/03/09/change-create-new-item-message-in-list-web-parts/ which explains this clearly.

March 14th, 2011 9:14am

Hi,

 

According to your description, I suggest that you should use JavaScript to do with it. For example, go to the document library which you want to modify, Site Action-> Edit Page->select add a web Part->choose Content Edit Web Part.
And then you need to a following sample code in Source Edit:
 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

    <script type ="text/javascript" >

        $(document).ready(function() {

$("table.ms-listviewtable table td.ms-vb:contains('There are no items')").text("");

     });

</script>

Please have try.

 
Best regards
David Hu

 

  • Marked as answer by Peng Lei Monday, March 21, 2011 1:20 AM
Free Windows Admin Tool Kit Click here and download it now
March 15th, 2011 1:16am

Although this is somewhat hacky, it is the method I used to solve this problem. I don't have access to Sharepoint Designer, so this jQuery solution was the ticket.

Just a note, if you have any AJAX updates (automatic refresh, for example) enabled, the 'There are no items to show...' text will reappear. jQuery will not get rid of it because this function is only run on document.ready()

February 28th, 2013 9:34pm

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type ="text/javascript" >
        $(document).ready(function() {
            $("table td.ms-vb:contains('There are no items')").text("");
     });
</script>

Only this 

$("table td.ms-vb:contains('There are no items')").text("");

also works

Your solution didnt worked in my case, but was helpful. I could find any table with class .listviewtable

Regards:

Gaurravs

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 3:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics