4

I am having a LVWP on a custom WebPart page. Got few properties set for webpart are as follows:

  • Inline editing is allowed
  • ASync refresh is allowed
  • Manual Refresh is allowed

Now the problem I am facing is, in this LVWP an icon is displayed for adding new item. I need to hide/remove that icon, since I don't want my users to add any items from there.

I have added javascript to remove it, which is working fine, The icon is not displayed on page load.

The challenge here is this LVWP has ASync refresh on, which refreshes the WebPart, and the icon gets displayed. $(document).ready(function () {} this method never gets called because of ASync refresh. How can I hide this icon in all scenarios.

Icon Snapshot:

This is the icon

6
  • I guess, if you select No Toolbar in Toolbar type it will not show that icon. This option is available in webpart properties when you edit webpart.
    – P S
    Commented Dec 28, 2015 at 8:52
  • Toolbar = No Toolbar already set,
    – Gaurravs
    Commented Dec 28, 2015 at 9:37
  • <Property Name="ChromeType" type="chrometype">None</Property> Toolbar is not a property in LVWP. Actual property is ChromeType in sharepoint.
    – Dipen Shah
    Commented Dec 28, 2015 at 12:35
  • @DipenShah ChromeType & ToolBar, both properties are available in SharePoint LVWP.
    – Gaurravs
    Commented Dec 28, 2015 at 12:43
  • @Gaurravs As per microsoft , Toolbar is not getting on MSDN.msdn.microsoft.com/EN-US/library/… . can you send me the link where toolbar is used. i want it for my code. i am using sharepoint 2013
    – Dipen Shah
    Commented Dec 28, 2015 at 12:50

1 Answer 1

2

Answer was pretty simple, instead of using js, css made my work

.s4-itm-hdrcol{
    display:none;
}

Incase of ASync refresh also, this css property get retained

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.