NoListItem Archives : Binary Bits https://blog.binarybits.net/tag/nolistitem/ Bits & Pieces - A blog by Kannan Balasubramanian Wed, 28 Jun 2017 10:14:34 +0000 en-GB hourly 1 https://wordpress.org/?v=6.5.2 Change SharePoint’s “there are no items to show in this view” message https://blog.binarybits.net/change-sharepoints-there-are-no-items-to-show-in-this-view-message/ https://blog.binarybits.net/change-sharepoints-there-are-no-items-to-show-in-this-view-message/#respond Thu, 25 May 2017 10:06:45 +0000 https://blog.binarybits.net/?p=884 When a list has not data to be shown in the view, we see the following message. There are no items to show in this view of the “<ListName>” list. The following JSLink script helps to change this message. (function () { var overrideCurrentContext = {}; overrideCurrentContext.Templates = {}; overrideCurrentContext.Templates.OnPreRender = changeNoListItemMessage; //OR overrideCurrentContext.OnPreRender = […]

The post Change SharePoint’s “there are no items to show in this view” message appeared first on Binary Bits.

]]>
When a list has not data to be shown in the view, we see the following message.

There are no items to show in this view of the “<ListName>” list.

The following JSLink script helps to change this message.

(function () {
    var overrideCurrentContext = {};
    overrideCurrentContext.Templates = {};
    overrideCurrentContext.Templates.OnPreRender = changeNoListItemMessage; //OR overrideCurrentContext.OnPreRender = changeNoListItemMessage;
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCurrentContext);
})();

function changeNoListItemMessage(ctx) {
    ctx.ListSchema.NoListItem = "No data";
}

Source: http://www.idubbs.com/blog/2015/jslink-csr-to-override-there-are-no-items-to-show-in-this-view/

The post Change SharePoint’s “there are no items to show in this view” message appeared first on Binary Bits.

]]>
https://blog.binarybits.net/change-sharepoints-there-are-no-items-to-show-in-this-view-message/feed/ 0