Friday, March 14, 2008

Hide Web part title

There are two ways to hide the Title of a particular web part:
1) Modify the *.webpart file.
By changing the settings related ChromeState and ChromeType we can hide Title.

<webPart xmlns="">
<property name="ChromeState"
<property name="ChromeType" type="chrometype">None</property>

2) Modify the Web part settings by SharePoint site.
a) Click "Modify Shared Web Part" menu.

b) Select "Chrome State" as "Normal" and "Chrome Type" as "None".

3) So the final result of changes will be…

Note: Some others interesting Web part properties are:

<webPart xmlns="">
<property name="AllowMinimize" type="bool">False</property>
<property name="AllowClose" type="bool">False</property>
<property name="AllowEdit" type="bool">False</property>
<property name="ShowActionLinks" type="bool">False</property>

Properties names are self-explanatory.


Shakadal said...

This comment has been removed because it linked to malicious content. Learn more.

Ash said...

Hello Avinash

Can you give me your email id or phone? I have some queries related with Sharepoint search and infopath list?

мαкαяαη∂ said...

Hi.. Myself Makarand

the information which u have given is correct. I am also doing the same but programmatically..

After doing this the title & border disappears but the problem is that some blank space is generated in place of Title. I dont want this blank space.

Do you hav any solution for this
If yes then do mailto:

Thanx in adv

Avinash said...

Hi Makarand,

Try this code...

using (SPSite site = new SPSite("site"))
using (SPWeb web = site.OpenWeb())
SPLimitedWebPartManager manager = web.GetLimitedWebPartManager(“url”,System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);
foreach (System.Web.UI.WebControls.WebParts.WebPart part in manager.WebParts)
part.ChromeType = PartChromeType.None;
catch (Exception e)
{ }