1

I put in my aspx page a ListViewByQuery control, to show a view on a library, based on a query that is dynamically constructed.

But, when I click on an item in the control, it does not show the document & library ribbon tabs. I already tried several things but none of them work. This is the last thing i tried:

aspx page:

<SharePoint:ListViewByQuery ID="lvqDossierFiles" runat="server" />

code behind:

SPRibbon current = SPRibbon.GetCurrent(this);
if (current != null)
{
     current.CommandUIVisible = true;
     current.MakeTabAvailable(SPRibbon.ReadTabId);
     current.MakeTabAvailable(SPRibbon.DocumentTabId);
     current.MakeTabAvailable(SPRibbon.LibraryTabId);
     current.CheckForInitializationReadiness = false;
     current.InitialTabId = SPRibbon.ReadTabId;
     current.Minimized = false;
} 

Someone has an idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.