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


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Asad Ali
Post New Web Links

Ribbon not updated when two listviewwebparts exist

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#
 

We have two ListViewWebPart webparts created dynamically (i.e programatically ) on the default.aspx page on two separate manual activations of the features. Two different lists are also assigned to them programatically. These lists have different buttons on the document ribbon and different buttons are disabled for each list.

Following is how the webparts are created.

   SPFile file = currentWeb.GetFile("Default.aspx");
   SPLimitedWebPartManager mngr = file.GetLimitedWebPartManager(PersonalizationScope.Shared);


   list = file.ParentFolder.ParentWeb.Lists[ComplianceDocLib.DocumentLibName];
   ListViewWebPart lv = new ListViewWebPart();
   lv.TitleIconImageUrl = "_layouts/images/iQDocLib.png";
   lv.ListName = list.ID.ToString("B").ToUpper();
   lv.ViewGuid = list.Views["HomePage"].ID.ToString("B").ToUpper();
   mngr.AddWebPart(lv, "Left", 0);

When the user clicks on the item check box on the list view webpart the ribbon that is shown
belongs to one of the list and this does not chang


View Complete Post


More Related Resource Links

Ribbon not updated when two ListViewWebParts exist on the page

  

We have two ListViewWebPart webparts created dynamically (i.e programatically ) on the default.aspx page on two separate manual activations of the features. Two different lists are also assigned to them programatically. These lists have different buttons on the document ribbon and different buttons are disabled for each list.

Following is how the webparts are created.

      SPFile file = currentWeb.GetFile("Default.aspx");
      SPLimitedWebPartManager mngr = file.GetLimitedWebPartManager(PersonalizationScope.Shared);


      list = file.ParentFolder.ParentWeb.Lists[ComplianceDocLib.DocumentLibName];
      ListViewWebPart lv = new ListViewWebPart();
      lv.TitleIconImageUrl = "_layouts/images/iQDocLib.png";
      lv.ListName = list.ID.ToString("B").ToUpper();
      lv.ViewGuid = list.Views["HomePage"].ID.ToString("B").ToUpper();
      mngr.AddWebPart(lv, "Left", 0);

When the user clicks on the item check box on the list view webpart the ribbon that is shown
belongs to one of th

Showing Ribbon on master page: The page you selected contains a list that does not exist.

  

I am performing a content database upgrade of a SharePoint 2007 site collection to SharePoint 2010. I used the mount-SPContentDatabase with the –UpdateUserExperience switch. I set the site to use the v4.master page as the master page. If the ribbon is not displayed on the page, the page renders. However when I show the ribbon I get the following error:

 

Server Error in '/' Application.

 


List does not exist.

The page you selected contains a list that does not exist. It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>

The name 'PopularApplicationSkins' does not exist in the current context for Ribbon.

  

Hi, when i want to set Office2007 style to my Ribbon, throw an exception and say:

The name 'PopularApplicationSkins' does not exist in the current context !

what should i do?

Thanks


Amin Mashayekhi

Creating Dialogs and Ribbon Controls for SharePoint 2010

  
SharePoint 2010 provides new user interface components, such as server ribbons, and the new dialog platform. As a developer, you can create controls for the server ribbon and dialog boxes for the dialog platform.

Toolbox: Updated grid controls, open-source comparison tools, and more

  

This time: Windows Forms grids, professional-looking date textboxes, file merging, and more.

Scott Mitchell

MSDN Magazine November 2007


RibbonX API: Extend The 2007 Office System With Your Own Ribbon Tabs And Controls

  

If you want to create your own professional looking tabs and controls in Office, check out the RibbonX API of the 2007 Microsoft Office system.

Eric Faller

MSDN Magazine February 2007


SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000

  

XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002


how to refresh image updated with AsyncFileUpload

  

I've created an AsyncFileUpload device that uploads an image in ListView but it doesn't refresh on the page until the page is manually refreshed. Any ideas on how to accomplish this? This is the applicable code:

In ListView control:

<asp:UpdatePanel ID="udpPhoto" runat="server">
    <ContentTemplate>
        <span style="text-align: center; vertical-align: middle; font-size: 7pt;">
            <br />
            <asp:Button ID="btnEPhoto" Font-Bold="False" TabIndex="160" Text="Upload/Change Photo"
                UseSubmitBehavior="False" OnClick="btnPhoto_Click" runat="server" />
            <br />
            <asp:Label ID="lblEPhoto" runat="server" Font-Bold="True" Text="Uploaded Photo:" />
            <br />
            <asp:HyperLink ID="lnkEPhoto" runat="server" BorderWidth="2px" NavigateUrl='<%# Eval("Photo_Recent") %>'
                Target="_blank">
                <asp:Image runat="server" ImageUrl='<%# Eval("Photo_Recent") %>' Height="50px" ID="imgEPhoto">
                </asp:Image>
      

Fix: The type or namespace name 'EntityDataSource' does not exist

  
Today's stupid mistake had me going in circles in my Web application project. The error message was: The type or namespace name 'EntityDataSource' does not exist. As the rest of the error message suggests, I must be missing an assembly reference. Nope, I'd already added in the references to Entity : System.Data.Entity System.Data.Entity.Design After much frustration until after 1 a.m., I gave up and went to bed. This morning I realized that what it wanted was the WEB Entity! System. Web .Entity System...(read more)

KPI for updated values

  

I would like to show a value in a KPI and I wonder if there's a way to have a list or something simple where ONE value can be inputted and possibly overwritten (using versioning for history) and that value is updated so the KPI indicates the updated value.  Normally this value will be updated daily.

I checked out Last list value as KPI and it says that it can't be done.  I don't know if anyone has any suggestions or recommendations for this.  I know that they want a history of this and they are currently referencing it in an excel spreadsheet that is linking and the Excel Services is running but seems to be having trouble.

Example:

The Values today are: 8

The above information would be updated daily and there only needs to be ONE value put in to do that update.  Is there something I could do out of the box (I don't do programming, but I do have SharePoint Designer).  For me, if a user inputs the value in a custom list, how do I have the KPI reference the LAST item, instead of a sum or max, or min.?  Is there a way to have only ONE item in the list that overwrites the other, without having to edit it?  I know views show that, if you

SPGridView Not Appearing When Rows Exist

  

I have added the contents of a DataTable to an SPGridView control.  When there are no rows in the DataTable it shows the message "There Is No Data" which is correct. 

When there are rows in the DataTable the SPGridView does not appear at all.

What could the issue be?

The code is below:

DataTable gridTable = new DataTable();
gridTable.Columns.Add("Assigned To");
gridTable.Columns.Add("Comment");
gridTable.Columns.Add("Outcome");		

queryDPM.ViewFields = "<FieldRef Name='AssignedTo'/>" +
					  "<FieldRef Name='RequestDPMReviewerComments' />" +
					  "<FieldRef Name='WorkflowOutcome' />";

sQueryStr = "<Where>" +
				 "<And>" +
					"<IsNotNull>" +
					 "<FieldRef Name='RequestDPMReviewerComments' />" +
					

Unable to Edit the properties of a document using the ribbon

  

I have created a new web part page and added a document library to that page.  In the ribbon the "Edit Properties" icon is enabled and I can edit the document properties.

When I add another web part to the page and go back to select a document, on the ribbon the "Edit Properties" icon is no disabled.  I can still edit the document using the context menu of the document.

Permissions on the library did not change when I added the additional web part.  The only change to the page was adding an additional web part.


CS0103: The name 'Helper' does not exist in the current context

  

Hey i have a Class named Helper.cs inside my App_Code folder.

And i get this error:

Compilation Error



Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0103: The name 'Helper' does not exist in the current context

Source Error:

Line 26:         {
Line 27:             SqlConnection con = new SqlConnection(Helper.ConnectionString());


The name 'User' does not exist in the current context.

  

Hey guys,

I've got a literal control to display the username of the user logged into our companies intranet system, originally I had a LoginName control but couldn't get strip to remove the domain from the username (as the format is domainname\username) so I'm trying it this way.

    protected void Page_Load(object sender, System.EventArgs e)
    {
        string[] Parts = User.Identity.Name.Split("\\");

        if (Parts.Length == 2)
        {
            loginName.Text = Parts[1];
        }
        else
        {
            loginName.Text = User.Identity.Name;
        }

    }


    protected void Page_Load(object sender, System.EventArgs e)
    {
        string[] Parts = User.Identity.Name.Split("\\");

Quick Note: Working with the SharePoint 2010 Ribbon User Interface

  
Learn to extend the Microsoft SharePoint 2010 ribbon by adding a custom button that executes server-side code.

Displaying the Server Ribbon and Site Actions Menu on Customized Search Pages Upgraded to SharePoint

  
Learn how to add the Site Actions menu and SharePoint Server ribbon to SharePoint Server 2007 search pages that you upgrade to SharePoint Server 2010 by using visual upgrade.

Video: The Ribbon User Interface in SharePoint 2010

  
This demonstration shows the SharePoint 2010 Server Ribbon. (Length: 2:37)
Categories: 
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