i couldn't get the InplaceSearch displayed on my webpart through onet.xml.

in my onet.xml file:

<View List="Lists/Aufgaben" BaseViewID="1" WebPartZoneID="TaskTab">
            <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> 
                    <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
                    <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
                      <property name="Title" type="string">Aufgaben</property>
                      <property name="ChromeType">None</property>
                      <property name="InplaceSearchEnabled">True</property>

If I go on the page which is created with this onet.xml, there is the webpart shown but without the Inplace Search.

But... if I double check with PowerShell InplaceSearchEnabled property is correctly set to "True".

But... if I dribble check the WebPart properties on the page (over edit page...) the checkbox for InplaceSearch is not checked.

All other properties work fine (like Title and ChromeType). Why the InplaceSearch don't :(

  • I have tried to set the property both from elements.xml and from web part page by directly adding the XsltListViewWebPart. But, except InPlaceSearchEnabled property everything else working.... So, seems like they forgot to add the support to provision this property. But, If I set from browser it works. Apr 10, 2015 at 4:43
  • 1
    Have you found a workaround? I encountered the same issue :( Sep 9, 2015 at 13:03
  • Also wondering if you have found a solution for this. Having the same issue.
    – Shihan
    Apr 21, 2016 at 14:29
  • Try to add the viewid and clientrender = true property in <view... Check the right syntax from google... At the moment, I only have access via mobile phone... Let me know, if this fixed the problem... I think, I fixed this with this props... But I'm not really sure :)
    – domsen123
    Apr 23, 2016 at 17:09

1 Answer 1


I experienced the same issue and was able to solve it (actually, it's a workaround) with JavaScript. It won't set the flag itself to true but will 'emulate' it. Here is a copy-paste-able code. If you want some explanations, please use the link InplaceSearchEnabled doesn't work when set programmatically in XsltListViewWebPart

/// we need to wait until clienttemplates.js is loaded
SP.SOD.executeFunc('clienttemplates.js', 'SPClientTemplates', function () {
    // code that will be run before rendering the script. It'a good time to configure everything for search input
    function onPreRender(ctx) {
        if (!window.g_listSearchBoxInfo)
            window.g_listSearchBoxInfo = [];
        var hasSearch = false;
        // if the searci is configured for this web part we won't want to add it twice
        for (var i = 0, len = window.g_listSearchBoxInfo.length; i &lt; len; i++) {
            if (window.g_listSearchBoxInfo[i].wpq === ctx.wpq) {
                hasSearch = true;

        if (!hasSearch) {
            // the structure of the object was got during debugging session
                fullSearchSiteUrl: _spPageContextInfo.webAbsoluteUrl,
                loadInProgress: false,
                searchBoxConstructor: null,
                sodFunc: null,
                sodKey: null,
                wpq: ctx.wpq

            // setting InplaceSearchEnabled in ListSchema
            ctx.ListSchema.InplaceSearchEnabled = true;

    // registering CSR template override
    var overrideCtx = {};
    overrideCtx.OnPreRender = onPreRender;


    // adding scripts (with condition if there were previously added or not)
    var searchScript = jQuery('script[src*="listsearchboxbootstrap.js"]');
    if (!searchScript.length) {
        RegisterSod('clientrenderer.js', '/_layouts/15/clientrenderer.js');
        RegisterSod('srch.resources.resx', '/_layouts/15/ScriptResx.ashx?culture=en-us&amp;name=Srch.Resources');
        RegisterSod('search.clientcontrols.js', '/_layouts/15/search.clientcontrols.js')
        RegisterSodDep('search.clientcontrols.js', 'clientrenderer.js');
        RegisterSodDep('search.clientcontrols.js', 'srch.resources.resx');
        RegisterSod('profilebrowserscriptres.resx', '/_layouts/15/ScriptResx.ashx?culture=en-us&amp;name=ProfileBrowserScriptRes');
        RegisterSod('sp.ui.listsearchbox.js', '/_layouts/15/sp.ui.listsearchbox.js');
        RegisterSodDep('sp.ui.listsearchbox.js', 'search.clientcontrols.js');
        RegisterSodDep('sp.ui.listsearchbox.js', 'profilebrowserscriptres.resx');

        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = '/_layouts/15/sp.ui.listsearchboxbootstrap.js';
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Jul 13, 2016 at 4:45
  • updated to provide to code with some comments
    – AJIXuMuK
    Jul 14, 2016 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.