Tuesday, July 17, 2012

Context sensitivity to the Custom Ribbon Controls

We can enable/disable the ribbon control based on list item selection.

This is an excellent blog for Contextual Ribbons

Hiding ribbons pragmatically
public void HideRibbons()
{
SPRibbon current = SPRibbon.GetCurrent(this.Page);

if (current != null && !this.Page.Request.IsAuthenticated)
{
current.CommandUIVisible = false;
}
}
We can see Ribbon control in Master page as shown in bellow snippet
"runat="server"
PlaceholderElementId="RibbonContaine" CssFile="">

runat="server"
Location="TabRowLeft" >"

SharePoint:SPRibbonPeripheralContent allowing us to place content next to the tabs of the ribbon.

No comments:

Post a Comment