0

I have 3 site collections : -site collection portal (http://xxx/SitePages/Home.aspx),

-site collection Spain (http://xxx/sites/spain/SitePages/Home.aspx)

-site collection China(http://xxxx/sites/china/SitePages/Home.aspx)

In site spain and china I have a custom web part, with same columns (example : code, Country,ReviewType, submittedDate, daysLeft), this is an example for spain,, same Webpart is in china too. enter image description here I want to create in the portal a webpart that brings the same data from webpart china and spain with daysLeft = 2. like that enter image description here I want to know if this scenario is feasable, and if yes, could you please give me an idea ? Thanks

1 Answer 1

0

I don't think it is possible (but of course I could be wrong because I have never faced similar problem before).

But if the webpart you are going to build is just for viewing data from both site collections, I think it is possible by using common Custom Visual Webpart functionality and ASP.NET code (hope what I think here is suitable to what you need), for example:

  1. Add a DataGrid, ListView, Repeater, or whatever data controls you think suitable to your needs.
  2. On the code behind, pull the data from both sites, do some processing if necessary, and bind them to your data control.
  3. Add other necessary functionalities such as pagination and sorting.
2
  • thanks for your answer, my webpart in china, spain is listview. how can I pull the data from both sites as you said ? Commented Oct 14, 2016 at 8:01
  • You could use SharePoint Search Query API. Here is a sample code using JSOM: pastebin.com/5b4QLkt6 . And here is another sample using CSOM: programming4.us/enterprise/15034.aspx Commented Oct 14, 2016 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.