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

1 Answer 1


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.

Your Answer

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

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