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()
        {

        }
    }
}
link|improve this question

20% accept rate
feedback

1 Answer

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

link|improve this answer
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/… – iHeartDucks Mar 8 '11 at 19:07
You can't do web part connections in the sandbox IIRC. – Ryan Mar 8 '11 at 21:09
feedback

Your Answer

 
or
required, but never shown

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