SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently trying to display a list view outside of its site collection. This has been done using

  String str = mySPView.RenderAsHtml();
  Controls.Add(new LiteralControl(str));

Since it is outside the site collection, clicking on the list will throw an error.

I tried to set each field to read only but that broke it.

How can I have this set to read only?

UPDATE: I am now attempting to retreive the SPListitemCollection & have it autoGenerated in an SPGridView

share|improve this question

If you are running outside of your site collection you could for REST with LISTDATA.svc which could be exploited even from a simple CEWP with some Javascript in it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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