Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Connect SharePoint List selected row to Custom Web Part?

$
0
0

Hello,

I was wondering if it is possible to transfer data between a list and a custom web part.  I know I can transfer row data between different SharePoint lists to act as filters; I simply want to employ the same functionality so that a SPGridView in my web part queries a second list based on the selected row of the first list.

Now I understand I could create two SPGridViews, each handling a different list, and replicating the row selected event for one of the grids, but I really have my heart dead set on an OOTB SharePoint List and a custom web part.

thank you for your time.

EDIT:

After further research, I've come to the understanding that I need a connectionconsumer webpart method in order to retrieve data from a webpart.

[ConnectionConsumer("Filter Consumer", "FilterConsumer")]
        public void ConsumeFilter(IFilterValues filterValues)
        {
            _filterVals = filterValues;
        }

But in order to interact with the right webpart, I need to use the matching Interface (e.g. IFilterValues) for the method parameter.  At least, that is what I believe.

So the question now becomes: what is the matching interface for connecting a SharePoint List web part via "Send Row of Data to" 


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>