1

I am trying to create a custom webpart which will act as a consumer webpart to the SharePoint List Filter WebPart. I have not been able to make this code work, the send filter values to option is disabled on the List filter web part. any ideas?

namespace PageViewerWithConnections.CustomPageViewer
{
    [ToolboxItemAttribute(false)]
    public class CustomPageViewer : System.Web.UI.WebControls.WebParts.WebPart
    {
        IFilterValues _filterVals;

        [ConnectionConsumer("Market")]
        public void ConsumeFilter(IFilterValues filterValues)
        {
            _filterVals = filterValues;
        }

        protected override void CreateChildControls()
        {

        }
    }
}
1

You've not added any parameters that you support to filterValues. See the example in Walkthrough: Writing a Simple Filter Consumer Web Part Sample specifically step 1 and SetConnectionInterface

  • Thanks Ryan, I am now getting the dreaded "Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. Show Error Details " error. I asked another question here sharepointoverflow.com/questions/10034/… – i.jk Mar 8 '11 at 19:07
  • You can't do web part connections in the sandbox IIRC. – Ryan Mar 8 '11 at 21:09

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.