Wednesday, August 31, 2011
SharePoint 2010 Ribbon Customization
Monday, August 1, 2011
New SharePoint 2010 content for download
Friday, March 25, 2011
Hide List View Tool bar Items
{
var doc = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i < doc.length; i++) {
var itm = doc[i];
if (itm.id.match('OpenInExplorer') != null)
{
var p = itm.parentNode;
p.removeChild(itm);
}
}
}
A few thoughts as to why it's not working...
1) Match for part of the text and leave off the "zz33_" as that part can be different for every page.
2) Don't delete the nodes, hide them
3) Make sure your code is loaded after the web part with the View dropdown (i.e. if using a Content Editor Web Part, move it under the list web part)
Reference:MSDNThursday, March 24, 2011
Add Web Parts to DispForm, EditForm or NewForm.aspx
One of the users of our SharePoint project asked if it was possible to show an “Item List” on the “View Item” page.
My first reaction was: “Of course it is, add a Web Part displaying the “Item List” to the page and we’re done”.
But when I browsed to the “View Item” page and clicked the “Site Actions” I noticed that there wasn’t an “Edit Page” option available. Strange, but after some -Googling- I found the following sollution:
- Open IExplorer and navigate to your “View Item” page (DispForm.aspx)
- Replace everything in the URL after “?ID=#“ with “&PageView=Shared&ToolPaneView=2″ (without the quotes of course) and press
Document library Views Dropdown to change the View disappeared
When you go to a document library or list in Sharepoint 2007, you see a dropdown in which you can select a different view or create a new view if you have the right permissions.
If you ever find yourself thinking “Where did the change the view dropdown go?”
Don’t worry, one of two things could have happened.
- You added a second document library webpart on your page, but this would be obvious because you would see two webparts, one with a dropdown and one without it.
- Your user (or yourself) -closed- the webpart and added it again, leaving the closed webpart on the page, but hidden. This one is harder to detect, because you only see the webpart without the dropdown.
How do you fix this?
In the first case there isn’t much of a problem, you -delete- the second webpart from the page or you leave it on there (but without the dropdown).
For the second case you’ll have to edit the page (Site Actions, Edit Page), press Add a Web Part. At the bottom of the dialog is a link “Advanced Web Part gallery and options“, click it. A side bar “Add Web Parts” appears. Below the “Select the collection you want to browse.” is a link called “Closed Web Parts“, when you click it the Web Part List with closed Web Parts appears. Select the Document Library Web Part and click the “Add” button on the bottom of the screen. The page will show the two Web Parts, -delete- the one without the dropdown and you’re back in business.
Why? A web part which shows a list is supposed to display only one view of the list at a time. But you can definitely change the view by modifying the shared web part properties.
Useful Parameters to date for WSS 3.0 and MOSS 2007
Back in the days of WSS v2 and SPS 2003, one could use some handy URL parameter passing to edit web pages and browse for or search web parts.
My three favorite parameters for WSS v2 and SPS2003 were:
To Correct or Remove Misbehaving Web Parts
http://server/default.aspx?Contents=1
To Open the Page in Web Part Design Mode
http://server/default.aspx?ToolPaneView=2
To Open the Search Web Part Zone
http://server/default.aspx?ToolPaneView=3
Now in WSS 3.0 and MOSS 2007 we have the much more practical approach of switching views. Enter the Site Actions Menu, using the menu options we can edit the page, browse to site settings, etc.. But what happens if the Site Actions menu is not visible on the page. Maybe it was missed in the look and feel or has been removed deliberately like I had to do recently for a client. Now why someone would need to remove it and how this can be achieved (in at least two ways) will be covered in a later post.
Here are my favorite parameters to date for WSS 3.0 and MOSS 2007:
To open the Design Bar - Useful for pages in the Pages Library
http://server/default.aspx?DisplayMode=Design
To turn on Web Part Zone Editing
http://server/default.aspx?ControlMode=Edit
Note: The Site Actions Menu is rights trimmed and that means not all users can see or use it. Users with limited access or read rights will not be able to make use of the URL\Query String parameters. The parameters are just an alternative to get to the editing\design controls rather then a security bypass.
Wednesday, February 23, 2011
how to do web part connections in SharePoint 2010
2) Add my custom web parts in that zones
3) Connect those web parts in the page itself.
When I created the web part using Visual Studio 2010 template, it got derived from System.Web.UI.WebControls.WebParts namespace,
I changed that to Microsoft.SharePoint.WebPartPages.WebPart which solved my problem.