SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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'm using a default SharePoint 2010 discussions web part in my site. By default it displays the top level posts that have been made to the discussion. When I click on a discussion it takes me away from the page hosting the web part and back to the standard discussion view page.

Is there a way I can get the posts for a single discussion thread displayed in the web part rather than having to navigate away to another page thus breaking my site's look and feel?

share|improve this question

I dont think that the OOB discussion web part can display the posts as well. You would need to use the SharePoint Object Model and code you own one.

share|improve this answer

I'm speaking from experience in MOSS but I don't think SP2010 is any different.

Yes - discussion lists work off of a folder structure: discussion posts are folders and responses are items in those folders. You can escape the responses in a LFWP just by adjusting the view to show items outside of folders. You can escape the responses in a DVWP by adjusting the data source item and scope properties.

To make this appear sensible, you might find it easiest to do two Web parts on the page: one for discussions up top and one for replies below and make a Web Part Connection between the two where Subject (of Discussion Post) = Discussion Title (of Reply). Use the "trimmed body" column in the Replies DVWP to keep it clean.

share|improve this answer

Your Answer


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