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 am building a custom visual webpart where I want to show all the calendar events across a site using SPSiteDataQuery. I know I can use repeater or grid view to show the data but I was wondering if there is a SharePoint data control I can leverage to have all the functionalities a list view webpart has (ecb/context menu, sorting, paging, etc). Any help will be appreciated.


share|improve this question
SPGridView, its just like List View... – Arsalan Adam Khatri Nov 20 '12 at 19:29
Arsalan, please add your comment as an answer and I will mark it as the accepted one. – Emon Nov 21 '12 at 17:05
there you go :) – Arsalan Adam Khatri Nov 21 '12 at 17:43
up vote 0 down vote accepted

SPGridView, its just like List View...

share|improve this answer… is a good resource for SPGridView – Emon Nov 21 '12 at 17:55

You can instantiate a ListViewWebPart in a visual web part.

Here's an example posted on this site:

How to extend a ListView WebPart (from code)

And here's a blog post with examples on how to perform the second option:

Create Custom ListViewWebPart

share|improve this answer
+1, sadly, ListViewWebPart is sealed. However both links are great and I can recommend them. – ppatalong Nov 20 '12 at 20:15
Reflection my friend. – RJ Cuthbertson Nov 20 '12 at 20:30

Interestingly, I see there's a ListViewByQuery Web Part here. I'll be trying it out to see if it does what I need.

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.