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


Post New Web Links

Error when programmatically connect filter webpart with excel webpart

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
 
Hello, On MOSS 2007 SP2 64bit I am trying to programmatically connect a SPSlicerTextWebPart with an ExcelWebRenderer but I am getting the error: "The connection point "IFilterValues" on "g_046273fe_af27_4064_86b1_70f2c57c326c"(the excel webpart)   is disabled" and I can't find a way to enable it... I'm using the folowing code: using(SPLimitedWebPartManager webPartMgr = web.GetLimitedWebPartManager("Stats.aspx", PersonalizationScope.Shared)) { Microsoft.SharePoint.Portal.WebControls.SPSlicerTextWebPart filterWebPart = (Microsoft.SharePoint.Portal.WebControls.SPSlicerTextWebPart)webPartMgr.WebParts[0]; if (filterWebPart.ConnectionID == Guid.Empty) { filterWebPart.ConnectionID = Guid.NewGuid(); } webPartMgr.SaveChanges(filterWebPart); ProviderConnectionPoint providerCP = webPartMgr.GetProviderConnectionPoints(filterWebPart)[0]; Microsoft.Office.Excel.WebUI.ExcelWebRenderer excelWebPart = (Microsoft.Office.Excel.WebUI.ExcelWebRenderer)webPartMgr.WebParts[1]; if (excelWebPart.ConnectionID == Guid.Empty) { excelWebPart.ConnectionID = Guid.NewGuid(); } excelWebPart.AllowConnect = true; webPartMgr.SaveChanges(excelWebPart); ConsumerConnectionPoint consumerCP = webPartMgr.GetConsumerConnectionPoints(excelWebPart)[2]; TransformableFilterValuesToFilterValuesTransformer t = new TransformableFilterValue


View Complete Post


More Related Resource Links

Error in / Application after adding employee search in webpart

  

Hello everyone,

I am working on sharepoint 2007 and I was editing the webpart of the software and after adding the predefined employee search table, the server has crashed while trying to access the server remotely with the following error message:

Error in / Application

However, while trying to login locally I have no problem and can easily login.

What will be the course of action in fixing this error.

Also the site is complaining of an invalid certificate even after adding an exception.

Any help would be greatly appreciated.


Thank You,

Chris Stanko


Programmatically delete a .webpart file from wpcatalogs folder from an IIS website

  

We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?


How best to filter the KPI webpart

  
To show kpi's for the "current" month.. do you use a filter webpart in conjunction with the kpi webpart?  Or do you handle that in the kpi in ssas?  Other solutions? Thanks, Ken

Add webpart programmatically to page in sharepoint

  
Hi How to add webpart programmaticaly in sharepoint ? CheersMomo

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

RSS Viewer webpart error

  
Hi, I am trying to add RSS feed to RSS viewer webpart, I got the following error ProtocolError occured trying to complete the request. The server returned a status code of : ProxyAuthenticationRequired and the status description is : "Proxy Authentication Required" Please any one can help me Thanks

MOSS 2007 SP2 Error after 3rd party Webpart uninstallation

  
To All Experts out there, How to remove the error message of the uninstalled 3rd party webparts from the WFE server ? I got this error message almost all the time everyday ?   ####################################################################################################################################################Log Name:      ApplicationSource:        Windows SharePoint Services 3Date:          8/09/2010 10:10:48 PMEvent ID:      7043Task Category: Web ControlsLevel:         ErrorKeywords:      ClassicUser:          N/AComputer:      MOSSDEV01.domain.comDescription:Load control template file /_controltemplates/BambooVisualIndicatorFieldEditor.ascx failed: Could not load file or assembly 'RadAjax.Net2, Version=1.8.5.0, Culture=neutral, PublicKeyToken=3f7b438d1c762d0b' or one of its dependencies. The system cannot find the file specified.####################################################################################################################################################Log Name:      ApplicationSource:        Windows SharePoint Services 3Date:          8/09/2010 10:09:40 PMEvent ID:      6611Task Category: RuntimeLevel: &nbs

How to add Metada Navigation (taxonomy tree and key filter) to new webpart page

  
Hi all, can anyone tell me if it's possible, and how, to use a Metada Navigation control (taxonomy tree and key filter) in a webpart page created like there are in the list pages. I was looking to add such a control and connect it to 2 listview webparts. Thanks in advance!  

Changing Properties/Attributes of a Webpart in inline code block - Error 'System.Web.UI.WebControl

  
I'm trying this code below, but gettting error: System.Web.UI.WebControls.WebParts.WebPart' does not contain a definition for 'FilterValue1' I need to change the value of the FilterValue1 properties of a content Query WebPart with title = Applicant Files. Thanks in Advance!
protected override void OnLoad(EventArgs e) {  base.OnLoad(e); SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite SiteCollection = new SPSite("https://somesite/")) { SPWeb myWeb = SiteCollection.OpenWeb(); myWeb.AllowUnsafeUpdates = true; Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager mgr = null; mgr = myWeb.GetLimitedWebPartManager("default.aspx",System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared); foreach (System.Web.UI.WebControls.WebParts.WebPart myWebPart in mgr.WebParts) { if (myWebPart.Title == "Applicant Files") { myWebPart.FilterValue1 = "/13"; mgr.SaveChanges(myWebPart); break; } } } }); }

Change webpart properties programmatically

  
I am attempting to modify the properties of another webpart when my webpart's button is clicked. The code compiles and runs, and stepping through it shows that the properties do change. However, they don't stay changed. This example attempts to toggle the visibility state, but other properties won't stay changed either. Any help is appreciated.     SPSecurity.RunWithElevatedPrivileges(delegate() { // get the site in this context using (SPSite SiteCollection = new SPSite(mySiteGuid)) { // get the web in this context SPWeb myWeb = SiteCollection.OpenWeb(myWebGuid); myWeb .AllowUnsafeUpdates = true; // Hide/display another webpart. Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager mgr = null; mgr = myWeb.GetLimitedWebPartManager( "default.aspx", System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared); foreach (System.Web.UI.WebControls.WebParts.WebPart myWebPart in mgr.WebParts) { // If this is the webpart we want to modify... if (myWebPart.Title == "Other Webpart Name") { // Toggle the visibility state. myWebPart.Visible = ! myWebPart.Visible; myWeb.Update(); break; } } } });

Report Viewer Webpart shows error

  
Hi Friends, I am Report Viewer Webpart in sharepoint 2010 when i provide the report1.rdl to this webpart it shows the error "SQL extension is not registerd on this web application" any help would be appreciated  

Unhandled Error in SL App...when trying to run SL4 app as a webpart

  
Hi, I've read about this issue in several places, but all the proposed solutions haven't worked for me. Here's the full error. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Timestamp: Fri, 17 Sep 2010 19:12:09 UTC Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()    at WOVM.WOWCF.MyFunctionCompletedEventArgs.get_Result()    at WOVM.MainPage.client_MyFunctionCompleted(Object sender, MyFunctionCompletedEventArgs e)    at WOVM.WOWCF.WOServiceClient.OnMyFunctionCompleted(Object state) Line: 1 Char: 1 Code: 0 URI: http://myvm:54321/default.aspx   So am I right to assume that the problem lies to the fact that the endpoint isn't relative? Either way, what can I do to solve it?     

Error calling a WebRequest.Create() from within a Sharepoint webpart

  

Hi,

 

I need to fetch data from a 3rd party URL (via a HTTP API call; different domain from where Sharepoint is hosted) to display inside a webpart. 

When I try to preview the webpart I get the following error:

Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I've also added the following to my web.config. Tried with trust levels as WSS_Medium and Full with no avail.

Any ideas? The part of the code without the webrequest executes well.


Access Denied Error Message from Custom Webpart

  

Hi,

I am new to MOSS so can anyone please help me to solve this problem.

Problem:

I've a list in MOSS-2007, and a group of people with Read Only Rights so they cannot change any list item. But I want to give them access to edit one column (i-e Comments) in that list.

So I created a custom web part page and put a comments text box in it. At DispForm.aspx page of list there is a link which redirects to Custom page for adding comments and I am passing Item ID in query string.

But the problem is that when anyone adds the comment on custom page an ACCESS DENIED message appears. I've even set "web.AllowUnsafeUpdates = true" but didn't work

Code:

            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                SPWeb web = SPContext.Current.Web;
                SPList lstTIX = web.Lists["ListName"];

             &nb

i am getting the error in when i deploy the webpart

  

I am getting the below error in when i  deploy webpart

Error 1 Error occurred in deployment step 'Activate Features': Attempted to perform an unauthorized operation.
  0 0 VisualWebPartProject2newg


                Thanks in advance.

With Best regards,

Gopi

 


Tag Cloud WebPart Problem - Error: The tagged items could not be displayed. There was a problem reac

  
When i click on the tag within the tag cloud. it transfers me to a page and says - Error: The tagged items could not be displayed. There was a problem reaching the search service. Please contact your system administrator for assistance.

please tell how should i resolve this problem.

Error occured when using SPWeb or SPSite in webpart

  

I am creating a custom webpart, in which I have a label control. This label will display the current site URL and here is the code

protected override void CreateChildControls()
        {
            base.CreateChildControls();
            SPWeb wb = SPContext.Current.Web;
            string baseURL = wb.Url.ToString();
            Label lblTitle = new Label();
            lblTitle.Text = baseURL.ToString();
        }

But when I try to use SPWeb or SPSite within CreateChildControl method, I am getting an unexpected error occurred message. Also I have used "using Microsoft.SharePoint;" too.

If suppose I comment those two line my web part is displaying the properly. As below

protected override void CreateChildControls()
        {
            base.CreateChildControls();
            //SPWeb wb = SPContext.Current.W

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