.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to enable "Save" Ribbon from a webpart?

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :SharePoint
Hi there, I've created a webpart for PDP. This webpart will display/update custom fields value for project. However, when I put the webpart on the PDP page. The Save ribbon is not enabled (I clicked edit to check out the project pdp)..So how do I enable this Save Ribbon?..... Thank you,Joe

View Complete Post

More Related Resource Links

Cannot enable Ribbon Edit Tab buttons and "connect" them to a list item in my custom webpart

I have one list with some custom fields and I want to develop a custom page. So, I created an ASPX page and added my custom webpart. This webpart has just a RichTextField, in edit mode, "linked" to one item of the list, like below: SPSite _SPSite = SPContext.Current.Site; SPWeb _SPWebProjects = _SPSite.OpenWeb("/Projects"); SPList _SPListProject = _SPWebProjects.GetList("/Projects/Lists/Project"); int _ID = Convert.ToInt32(this.Page.Request.QueryString["ID"]); RichTextField _RTF = new RichTextField(); _RTF.ID = "RTF"; _RTF.ControlMode = SPControlMode.Edit; _RTF.FieldName = "History"; _RTF.ItemContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); _RTF.RenderContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); this.Controls.Add(_RTF);   Then, I "turned on" the edit tab on the ribbon by doing the follow: protected override void OnPreRender(EventArgs e) { SPRibbon _CurrentRibbon = SPRibbon.GetCurrent(this.Page); _CurrentRibbon.TrimById("Ribbon.WebPartPage"); _CurrentRibbon.MakeTabAvailable("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.Minimized = false; _CurrentRi

How to catch Save Ribbon event from code-behind for the custom webpart

Hi there, How can a custom web part(sitting on top of PDP) catch the Save Ribbon event from code? I’ve been looking around for solution, but not yet find one…. Thank you, —JoeJoe

Catch Save Ribbon Event from code-behind for webpart control

Hi there, How can a custom web part catch the Save Ribbon event from code-behind? Thank you, —JoeJoe

Catch Save Ribbon Event from code-behind for webpart control

Hi there, How can a custom web part catch the Save Ribbon event from code-behind? Thank you, —JoeJoe

Enable Disable Save Button in Winforms App

Hi, In our windows forms application we have many forms with "Save" buttons. We want to enable them only if the data in the form is changed. At the moment it is handed by adding flags to check whether the data is dirty. Is there any easy way to handle this? May be something with the famework? Thanks,CJ

Save as Site Template issue with Enable Labels Policy

I am having issues saving a site as a template. I have a basic team site. The only thing i have done is set 'Enable Labels' on the Shared Document library, the label format being {version} I then try to save site as a template and get the error... Error Error exporting the list named "Shared Documents" at the URL: Shared Documents Any ideas? I have replicated this issue on a new build of SharePoint 2010 in a test environment.

Button in Ribbon.ListItem.New doesn't appear when list is added via a webpart


I have added a button to a project task list (id = 150).
Everything works fine when I directly use the list. But when I add the list via a webpart to the site page my new button is not available. It's exactly the same ribbon as in the list view but my new button is not visible. Any suggestions?

  Title="Ribbon Customization for a Content Type">
    <CommandUIDefinition Location="Ribbon.ListItem.New.Controls._children">

How to enable Word 2010 to save to one of the document libraries on a newly installed Sharepoint Ser



I have a newly installed Sharepoint Server 2010 (say, http://spserver/) somewhere on our LAN on Windows Server 2008 R2. And I am working with Word 2010 on my Windows 7 machine. I have created a Document library somewhere in a subsite of the Sharepoint server (say, http://spserver/subsite/doclibrary)

Now, working with Word 2010 I want to simply save the document that I'm working into that document library Doclibrary. I go to Word 2010 backstage... and can't find anything there.

1) Save As? It only shows my file system...

2) Save & Send? I see there Save to Sharepoint. But Browse for Location button gives me nothing. If I press Save As here, I just get my file system again.

What should I configure on Sharepoint server or in my machine, so that I can save to my doclibrary with as few clicks as possible, just like I always did with my local file system.

Ribbon Save Button Causes Validation


On a publishing site in 2010, it appears that the ribbon save button triggers validation on validators that have a specific validation group defined.  I'm confused as to how this happens, but it apparently does.

I have a web part with a simple input form and some validators.  When switching out of edit mode, the validators are triggered and the page won't switch back to normal view.

Any ideas?

Custom ribbon button not showing when selecting item in webpart


Wondering if any one else seen this, I noticed custom ribbon buttons don't show up when I select item in document library in webpart view. Site is created using team site template and the webpart that shows contents of a document library is inside of a wiki editing control in team site home page

Button shows up correctly when I select the item once in document library view

Microsoft Certified Master | SharePoint 2007

Ribbon enable disable when the listelement is opened



at the moment the ribbon is enabled / disabled if an item is selected or not

but i want to enable to ribbon, too if u clicked an item and opened this one item


but therefor i have to check, if im in the listview or in the itemview


but how can i check this?


right now i en/disable the button that way:


    var items = SP.ListOperation.Selection.getSelectedItems();
    var count = CountDictionary(items);

    return (count == 1);


but i need an if/else, if im in the list or in the item

How to hide ribbon buttons in a publishing webpart page?



I'm trying to hide some ribbon buttons from a publishing web part page(a page thats url ends with: /pages/default.aspx), and i just can't seem to do it.

I created a feature with custom actions to hide the buttons but it doesn't work for publishing web part pages.

Can someone give me a working example on how to hide the Make Homepage button from a webpartpage?

Here is the code i used that's currently not working, in 3 different formats, neither of them works for me:


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

How to override functionality of the Ribbon Save button ?


Dear all,

I have a custom editform for my library which I generated using SharePoint Designer.

This custom form also includes the Save button on the form itself along with the the ribbon save button. I need to add additional functionality to my save.

The button on the form is a SharePoint:SaveButton webcontrol...

< SharePoint:SaveButton runat="server"/>

I can override this adding my own functionality like this

public class CustomSaveButton : SaveButton
 Control c;
 protected override void OnInit(EventArgs e)

 protected override bool SaveItem()
	// Do the custom code here..
	return base.SaveItem();

After this I can add back my custom save to the form.. like below

<%@Assembly Name="CustomOverrideControls, Version=, Culture=neutral, PublicKeyToken=uhdsksuew9832iwe82" %>

<CustomOverrideControls:CustomSaveButton TemplateName="SaveButtonNew" runat="server"/>


All this is fine.. but what if the user skips this button and clicks on the 'Save' button on the Ribbon.. my custom code will not be executed :(

Question is how can I override the save functionality of the Ribbon Save button ?

Any help appreciated.



How to enable a User to select n-Document from a custom WebPart



i am developing a WebPart which have several Input Fields (Textboxes) and after he fills the Input Fields he need to select n-Documents from a specified Document Library.

But i dont know how to do that. How would you do that? Which ways are here possible?

Best regards,
Yavuz B.

My Sharepoint and Enterprise 2.0 Blog http://www.starcoder.net
Microsoft Sharepoint Resources & Blogs List

Enable/Disable "New Folder" ribbon menu in document library in sharepoint 2010


I am new to sharepoint 2010. I want to disable "New Folder" server ribbon menu under document library only if I am at level greater than 2 in document library. If level is <=2 "New Folder" ribbon menu should be enabled. How I should achive this enable/disable feature of existing "New Folder" menu item?    

Enable/Disable "Edit" and "Check In" buttons in Ribbon

We want to enable or disable "Edit" or "check in" buttons in ribbon depending upon code run in C#. We have visited a lot of resource but mostly describes for custom buttons. We need to do this for buttons provided out of the box. Any help?

Content Editor WebPart Cannot retrieve properties or save changes


When a content editor webpart is open for editing - if they use the Rich Text Editor the error message is "Cannot retrieve properties at this time

If they use the Source Editor - they can make changes but it give them the message "Cannot save changes"

Sheryl L Fackler
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend