"Find an item" search on List View Webpart will be deployed visible to target sites

Document created by ChristofN Employee on Mar 29, 2019
Version 1Show Document
  • View in full screen mode



After deploying a solution to a site, the "Find an item" search on top of List View Webpart is shown even it was deactivated in source solution.


Configuration in source solution:

List View Webpart property: Display search box


Technical Background

The InplaceSearchEnabled property of XsltListViewWebPart cannot be changed programmatically by CSOM we need for publishing.

As we want to keep understandable behavior of configuration on deployed site, it's not possible to override the ootb functionality in deployed solutions.



These are two workarounds to hide this search input in target sites (deployments).

Option 1: Manual steps after initial deployment 

  • Set Webpart property Display search box in target site after deployment on each List View Webpart

For sure this is not efficient if you have many deployments and List View Webparts in your solution.

Deployment updates do not set back this property. It keeps the hidden search boxes you set in target sites after updates.

Option 2: Add Content Editor Webpart with styles

  1. Add a Content Editor Webpart to the page in your source solution where you have List View Webpart with search input
  2. Add this style to Content Editor Webpart (Edit Source):
    <style type="text/css">
    .ms-InlineSearch-DivBaseline {

  3. Package and Publish the solution to the target site.

This style hides "Find an item" search inputs on all List View Webpart on the page where it's placed.